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>
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 + "\""