X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fconvertrules.py;h=2bfbdce1ebf9c55b76e02212bc6f88777b49d281;hb=3f20c6178c3090afdf495f66b595677388a21629;hp=5c94c59e1f7a88a42aa4cad91598cff460f37965;hpb=9d1520b21710bd22872010ae9aa4c4899014e9d4;p=lilypond.git diff --git a/python/convertrules.py b/python/convertrules.py index 5c94c59e1f..2bfbdce1eb 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3346,6 +3346,20 @@ def conv (str): sub_tempo, str) return str +@rule((2, 15, 39), r"\footnote ... -> \footnote ... \default") +def conv (str): + def not_first (s): + def match_fun (m): + if m.group (1): + return m.group (0) + return m.expand (s) + return match_fun + str = re.sub ("(" + matchmarkup + ")|" + + r"(\\footnote(?:\s*" + + matchmarkup + ")?" + matcharg + "(?:" + matcharg + + ")?\s+" + matchmarkup + ")", + not_first (r"\2 \\default"), str) + return str # Guidelines to write rules (please keep this at the end of this file) #