X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=buildscripts%2Fextract_texi_filenames.py;h=5798d5dab26878889869a5a3e1b49cab264519e8;hb=62b69827c3045f819814ce74b5f485f482819f99;hp=6b89954b256f89c6ce7564f523c1d6323191bf59;hpb=37c6de63d5f12cf9e42d04d56280aaf261ddc880;p=lilypond.git diff --git a/buildscripts/extract_texi_filenames.py b/buildscripts/extract_texi_filenames.py index 6b89954b25..5798d5dab2 100755 --- a/buildscripts/extract_texi_filenames.py +++ b/buildscripts/extract_texi_filenames.py @@ -18,7 +18,7 @@ # NODE\tFILENAME\tANCHOR # LANG is the document language in case it's not 'en' # Note: The filename does not have any extension appended! -# This file can then be used by our texi2html init script to determine +# This file can then be used by our texi2html init script to determine # the correct file name and anchor for external refs import sys @@ -41,7 +41,9 @@ if not os.path.isdir (outdir): include_re = re.compile (r'@include ((?!../lily-).*?)\.texi$', re.M) whitespaces = re.compile (r'\s+') -section_translation_re = re.compile (r'@(node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading|translationof) (.*?)\s*\n') +section_translation_re = re.compile ('^@(node|(?:unnumbered|appendix)\ +(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|\ +(?:major|chap|(?:sub){0,2})heading|translationof) (.*?)\\s*$', re.MULTILINE) def expand_includes (m, filename): filepath = os.path.join (os.path.dirname (filename), m.group(1)) + '.texi'