From: Reinhold Kainhofer Date: Sun, 2 Sep 2007 23:04:20 +0000 (+0200) Subject: MusicXML: Always quote texts (header, lyrics) that contain periods or commas X-Git-Tag: release/2.11.33-1~4^2~17^2~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9e35de84c2171b53668e3dfde245778e2a23807f;p=lilypond.git MusicXML: Always quote texts (header, lyrics) that contain periods or commas 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 --- diff --git a/python/musicxml.py b/python/musicxml.py index a24cb53caa..e00bc07d2e 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -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 + "\""