From 9e35de84c2171b53668e3dfde245778e2a23807f Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Mon, 3 Sep 2007 01:04:20 +0200 Subject: [PATCH] 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 --- python/musicxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 + "\"" -- 2.39.5