]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add one-time convert-ly rule for grace beaming
authorDavid Kastrup <dak@gnu.org>
Fri, 27 Sep 2013 13:40:54 +0000 (15:40 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 4 Oct 2013 09:52:41 +0000 (11:52 +0200)
python/convertrules.py

index 1ab911cca2c3f576f103e3eeee8566bfcd0bc481..2202cf0d99546d17f8784751c040344683e17cca 100644 (file)
@@ -3672,6 +3672,12 @@ def conv(str):
         stderr_write (_ ("Staff-padding now controls the distance to the baseline, not the nearest point."))
     return str
 
+@rule((2, 17, 28), r'''\grace { x[ ... ] } -> \grace { x ... }''')
+def conv(str):
+    str = re.sub (r"(\\(?:grace|appoggiatura|acciaccatura|slashedGrace)\s*\{\s*(?:[()a-zA-Z',0-9.]|\\[()])*)\[([^][{}]*)\]((?:[()]|\\[()]|\s)*\})",
+                  r"\1\2\3", str)
+    return str
+
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,