]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add convert-ly rule for unquoting tuning assignments
authorDavid Kastrup <dak@gnu.org>
Thu, 2 Aug 2012 08:07:07 +0000 (10:07 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 5 Aug 2012 23:37:12 +0000 (01:37 +0200)
python/convertrules.py

index e3d5dd65d0c5c14cd7e954f96dc6264de1cf5f7c..44ecf049e78c04e5691e1fa1a2c142f2b731836b 100644 (file)
@@ -3373,6 +3373,13 @@ def conv (str):
     str = re.sub (r"(\\set\s+)stringTuning", r"\1Staff.stringTuning", str)
     return str
 
+wordsyntax = r"[a-zA-Z\200-\377](?:[-_]?[a-zA-Z\200-\377])*"
+
+@rule ((2, 15, 43), r'"custom-tuning" = -> custom-tuning =')
+def conv (str):
+    str = re.sub ('\n"(' + wordsyntax + r')"(\s*=\s*\\stringTuning)', "\n\\1\\2", 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,