]> git.donarmstrong.com Git - lilypond.git/commitdiff
In python/musicexp.py:
authorJohn Gourlay <john@weathervanefarm.net>
Thu, 26 May 2016 20:24:23 +0000 (16:24 -0400)
committerJohn Gourlay <john@weathervanefarm.net>
Thu, 26 May 2016 20:24:23 +0000 (16:24 -0400)
  In the ly output add a space between a direction modifier and quote.
  Remove a redundant <<.
In python/musicxml2ly_conversion.py:
  Add a definition for _.

python/musicexp.py
python/musicxml2ly_conversion.py

index 998267550e22a2570a8dd0f51f6d2cba2a15a3ff..a7b569a5aab8fbea71a5c89d689de4d0d56992bd 100644 (file)
@@ -1361,7 +1361,12 @@ class TextEvent (Event):
         return { 1: '^', -1: '_', 0: '-' }.get (self.force_direction, '-')
 
     def ly_expression (self):
-        base_string = '%s\"%s\"'
+        # self.text will be enclosed by quotes, and the direction
+        # modifier must be separated from the opening quote by a space.
+        # This is so that subsequent line breaking for the output file
+        # using utilities.split_string_and_preserve_doublequoted_strings()
+        # properly detects the opening quote.
+        base_string = '%s \"%s\"'
         if self.markup:
             base_string = '%s\markup{ ' + self.markup + ' {%s} }'
         return base_string % (self.direction_mod (), self.text)
@@ -2167,7 +2172,7 @@ class StaffGroup:
             self.print_ly_context_mods (printer)
             for m in self.context_modifications:
                 printer.dump (m)
-            printer.dump ("} <<")
+            printer.dump ("}")
             printer.newline ()
         #print a single << after StaffGroup only when the with-block is not needed.
         #This doesn't work. << is printed before and after StaffGroup!
index 6216b540fb728dbba5e71f9bfdc9845ce2df63d2..67df2add8382dda20cfe71a0df3856659ab153af 100644 (file)
@@ -2,6 +2,7 @@
 from rational import *
 import lilylib as ly
 import musicexp
+_ = ly._
 
 def rational_to_lily_duration(rational_len):
     d = musicexp.Duration()