]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Always quote texts (header, lyrics) that contain periods or commas
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sun, 2 Sep 2007 23:04:20 +0000 (01:04 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Thu, 6 Sep 2007 14:15:22 +0000 (16:15 +0200)
While lyrics syllables might contain periods or commas without requiring
quotes around the syllables, header fields need quotes. Wrap the quotes
around just to make sure for the lyrics and to fix header fields.

Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
python/musicxml.py

index a24cb53caae4ceea7038891438c8816b7d3cf8dc..e00bc07d2eb6ea0e7423531ac8a417848958cdf6 100644 (file)
@@ -5,7 +5,7 @@ import re
 
 def escape_ly_output_string (input_string):
     return_string = input_string
-    needs_quotes = re.search ("[0-9\" ]", return_string) or re.search ("^[,.]", return_string);
+    needs_quotes = re.search ("[0-9\" ,.]", return_string);
     return_string = string.replace (return_string, "\"", "\\\"")
     if needs_quotes:
         return_string = "\"" + return_string + "\""