diff options
author | David Kastrup <dak@gnu.org> | 2016-07-03 01:40:04 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2016-07-10 19:51:28 +0200 |
commit | 3058940cba235a24cd3408d9fd27fb9a8ca2bbe0 (patch) | |
tree | 602ac490ead47c026bf030050bb88960b406982b /python | |
parent | 1d1976cb7da1d4625357e59a34837b1d46cac70c (diff) |
Issue 4914/2: convert-ly rule for removing Output_property_engraver
It's highly unlikely that users will redefine the Score context from
scratch, so the convert-ly rule just removes every occurence of
Output_property_engraver from user source. Obviously, when running the
rule on the LilyPond code base, we will need to fix up the Score
engraver manually to retain the Output_property_engraver .
Diffstat (limited to 'python')
-rw-r--r-- | python/convertrules.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/convertrules.py b/python/convertrules.py index dbe59faa96..f64312a839 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3888,7 +3888,8 @@ def conv (str): repl, str) return str -@rule ((2, 19, 46), r"\context ... \modification -> \context ... \with \modification") +@rule ((2, 19, 46), r"""\context ... \modification -> \context ... \with \modification +\consists "Output_property_engraver" ->""") def conv (str): word=r'(?:#?"[^"]*"|\b' + wordsyntax + r'\b)' mods = string.join (re.findall ("\n(" + wordsyntax + r")\s*=\s*\\with(?:\s|\\|\{)", str) @@ -3897,6 +3898,9 @@ def conv (str): + r"(?:new|context)\s*" + word + r"(?:\s*=\s*" + word + r")?)\s*)(\\(?:" + mods + "))", r"\1\\with \2", str) + + str = re.sub (r'\\(consists|remove)\s+"?Output_property_engraver"?\s*', + '', str) return str # Guidelines to write rules (please keep this at the end of this file) |