From: Reinhold Kainhofer Date: Sun, 28 Oct 2007 20:45:38 +0000 (+0100) Subject: MusicXML: Correctly split multi-line part group names X-Git-Tag: release/2.11.35-1~57 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=59b852e23b0d0e48d47e567ad20203d113795bd6;p=lilypond.git MusicXML: Correctly split multi-line part group names newlines might consist of \r, \n, or combinations thereof, so we need to split at any combination of these. --- diff --git a/python/musicexp.py b/python/musicexp.py index 050ae66c03..d4f90827e2 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -8,8 +8,9 @@ from rational import Rational def escape_instrument_string (input_string): retstring = string.replace (input_string, "\"", "\\\"") - if re.match ('.*\n.*', retstring): - strings = retstring.split ('\r\n') + if re.match ('.*[\r\n]+.*', retstring): + rx = re.compile (r'[\n\r]+') + strings = rx.split (retstring) retstring = "\\markup { \\column { " for s in strings: retstring += "\\line {\"" + s + "\"} "