lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MusicXML: Convert all clefs, escape " in header fields, code simplificat


From: Han-Wen Nienhuys
Subject: MusicXML: Convert all clefs, escape " in header fields, code simplification
Date: Thu, 13 Sep 2007 00:07:28 +0200

+def escape_ly_output_string (input_string):
+    return_string = input_string
+    needs_quotes = re.search ("[0-9\" ]", return_string) or re.search
("^[,.]", return_string);
+    return_string = string.replace (return_string, "\"", "\\\"")
+    if needs_quotes:
+        return_string = "\"" + return_string + "\""
+    return return_string

I think it's better to reverse this: only leave out the quotes if a
word is composed of [a-zA-Z] only.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]