From 81f4a71e5a50987d0d591a1d16f5aabe493dab2e Mon Sep 17 00:00:00 2001 From: Frederic Bron Date: Fri, 11 Jun 2010 14:14:52 +0200 Subject: [PATCH] fixed issue 1109: makelsr.py now strips right-hand whitespace --- scripts/auxiliar/makelsr.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.39.5