]> git.donarmstrong.com Git - lilypond.git/commitdiff
Convert-ly: fix regexp for Dynamics context
authorValentin Villenave <valentin@villenave.net>
Mon, 1 Nov 2010 16:17:20 +0000 (17:17 +0100)
committerValentin Villenave <valentin@villenave.net>
Sat, 13 Nov 2010 17:55:51 +0000 (18:55 +0100)
The regexp was too greedy and also removed Performer_groups
(e.g. Piano template).  The new rule prints a comment in lieu
of the removed \context{} block.

python/convertrules.py

index 91380958bd8a47885923ae860dee182ba03fa705..d1d393ae5f32013634dc954cf46d4caa3f7bdc2c 100644 (file)
@@ -2950,8 +2950,8 @@ you must now specify the distances between staves rather than the offset of stav
     str = re.sub ('ly:(system-start-text::print|note-head::brew-ez-stencil|ambitus::print)',
                   '\\1', str)
     str = re.sub ('(\\bBeam\\s+#\')(?=thickness\\b)', '\\1beam-', str)
-    str = re.sub (r'(\\context\s*\{{1}[^\}]+\\name\s+"*Dynamics"*[^\}]*\}{1})',
-                  '', str)
+    str = re.sub (r'(\\context\s*\{{1}[^\}]+\\type\s+\"?Engraver_group\"?\s+\\name\s+"*Dynamics"*[^\}]*\}{1})',
+                  '% [Convert-ly] The Dynamics context is now included by default.', str)
     return str
 
 @rule ((2, 13, 10),