]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/convertrules.py
Add convert-ly rule for unquoting tuning assignments
[lilypond.git] / 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,