From bbdf994d643ea96c3cabfb40fbe2f4d22af93233 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 27 Sep 2013 15:40:54 +0200 Subject: [PATCH] Add one-time convert-ly rule for grace beaming --- python/convertrules.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/convertrules.py b/python/convertrules.py index 1ab911cca2..2202cf0d99 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -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, -- 2.39.2