From: Reinhold Kainhofer Date: Mon, 7 Apr 2008 08:33:39 +0000 (+0200) Subject: texi2html: Fix translation of section titles X-Git-Tag: release/2.11.58-1~32^2~158 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=70cebcb86474ab46cc7d4edec107e07cf80ad9a2;p=lilypond.git texi2html: Fix translation of section titles texi2html inserts a whitespace at the beginning and the end of a section title, i.e. "

Chapter blah

", while makeinfo didn't use a space "

Chapter blah

". Update the regexp that extracts the section titles accordingly to allow spaces right after and before ... --- diff --git a/buildscripts/html-gettext.py b/buildscripts/html-gettext.py index 65efe8f283..7b381349b5 100644 --- a/buildscripts/html-gettext.py +++ b/buildscripts/html-gettext.py @@ -88,7 +88,7 @@ for filename in args[3:]: page = re.sub (r'([^<]*?) - ([^<]*?)', title_gettext, page) # ugh page = re.sub (r'(?ms))()?(Appendix )?([A-Z\d.]+ |)(.+?)(?(3)):?', a_href_gettext, page) - page = re.sub (r'(Appendix |)([A-Z\d.]+ |)?([^<]+)', h_gettext, page) + page = re.sub (r'\s*(Appendix |)([A-Z\d.]+ |)?([^<]*[^< ])\s*', h_gettext, page) page = re.sub (r'(.+?)', crossmanual_ref_gettext, page) # this is necessary for entries not translated by a_href_gettext page = re.sub (r'(.+?)', crossmanual_ref_gettext, page)