+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 - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel