From: Frederic Bron Date: Fri, 11 Jun 2010 12:14:52 +0000 (+0200) Subject: fixed issue 1109: makelsr.py now strips right-hand whitespace X-Git-Tag: release/2.13.24-1~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=81f4a71e5a50987d0d591a1d16f5aabe493dab2e;p=lilypond.git fixed issue 1109: makelsr.py now strips right-hand whitespace --- diff --git a/scripts/auxiliar/makelsr.py b/scripts/auxiliar/makelsr.py index ca7db5c5b2..1076f22ded 100755 --- a/scripts/auxiliar/makelsr.py +++ b/scripts/auxiliar/makelsr.py @@ -83,6 +83,7 @@ def mark_verbatim_section (ly_code): lsr_comment_re = re.compile (r'\s*%+\s*LSR.*') begin_header_re = re.compile (r'\\header\s*{', re.M) ly_new_version_re = re.compile (r'\\version\s*"(.+?)"') +strip_white_spaces_re = re.compile (r'[ \t]+(?=\n)') # add tags to ly files from LSR def add_tags (ly_code, tags): @@ -136,6 +137,7 @@ def copy_ly (srcdir, name, tags): s = mark_verbatim_section (s) s = lsr_comment_re.sub ('', s) + s = strip_white_spaces_re.sub ('', s) open (dest, 'w').write (s) e = os.system ("convert-ly -e '%s'" % dest)