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 .
-@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)
def conv (str):
word=r'(?:#?"[^"]*"|\b' + wordsyntax + r'\b)'
mods = string.join (re.findall ("\n(" + wordsyntax + r")\s*=\s*\\with(?:\s|\\|\{)", str)
+ r"(?:new|context)\s*" + word
+ r"(?:\s*=\s*" + word + r")?)\s*)(\\(?:" + mods + "))",
r"\1\\with \2", 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)
return str
# Guidelines to write rules (please keep this at the end of this file)