]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4803: Amend convert-ly 2.17.6 rules for \tweak
authorDavid Kastrup <dak@gnu.org>
Tue, 15 Mar 2016 12:50:05 +0000 (13:50 +0100)
committerDavid Kastrup <dak@gnu.org>
Tue, 22 Mar 2016 10:39:13 +0000 (11:39 +0100)
Double application was problematic.  Since grob properties start with
lowercase letters or X or Y while grob names start with A-W, it can be
reliably avoided to do the incorrect double conversion

    \tweak #'style #'none ...
    -> \tweak style #'none ...
    -> \tweak style.none ...

python/convertrules.py

index 3c9caad397a8e72d65b80279172b71fcc8b691ee..9de12567832817b4babd87e7594c8025dc0b3aff 100644 (file)
@@ -3468,9 +3468,9 @@ def conv (str):
                   r"\1\2.\3", str)
     str = re.sub (r'''(\\(?:alterBroken|overrideProperty)\s+)#?"([A-Za-z]+)\s*\.\s*([A-Za-z]+)"''',
                   r"\1\2.\3", str)
-    str = re.sub (r'''(\\tweak\s+)#?"?([A-Za-z]+)"?\s+?#'([-A-Za-z]+)''',
+    str = re.sub (r'''(\\tweak\s+)#?"?([A-W][A-Za-z]*)"?\s+?#'([a-zX-Z][-A-Za-z]*)''',
                   r"\1\2.\3", str)
-    str = re.sub (r'''(\\tweak\s+)#'([-A-Za-z]+)''',
+    str = re.sub (r'''(\\tweak\s+)#'([a-zX-Z][-A-Za-z]*)''',
                   r"\1\2", str)
     str = re.sub ("(" + matchmarkup + ")|"
                   + r"(\\footnote(?:\s*"