From: John Mandereau Date: Thu, 8 May 2008 13:08:04 +0000 (+0200) Subject: Add hack in makelsr to strip '% LSR' comments X-Git-Tag: release/2.11.46-1~19^2~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d9d94a2174fa52951f23f8710c688acc98cd3864;p=lilypond.git Add hack in makelsr to strip '% LSR' comments --- diff --git a/buildscripts/makelsr.py b/buildscripts/makelsr.py index 66bb8faacf..2202b65b63 100755 --- a/buildscripts/makelsr.py +++ b/buildscripts/makelsr.py @@ -59,7 +59,10 @@ end_header_re = re.compile ('(\\header {.+?doctitle = ".+?})\n', re.M | re.S) def mark_verbatim_section (ly_code): return end_header_re.sub ('\\1 % begin verbatim\n', ly_code, 1) -begin_header_re = re.compile ('\\header\\s*{', re.M) +# '% LSR' comments are to be stripped +lsr_comment_re = re.compile (r'\s*%+\s*LSR.*') + +begin_header_re = re.compile (r'\\header\s*{', re.M) # add tags to ly files from LSR def add_tags (ly_code, tags): @@ -84,6 +87,7 @@ def copy_ly (srcdir, name, tags): s = LY_HEADER_NEW + s s = mark_verbatim_section (s) + s = lsr_comment_re.sub ('', s) open (dest, 'w').write (s) e = os.system ("convert-ly -e '%s'" % dest)