Index: python/musicexp.py |
diff --git a/python/musicexp.py b/python/musicexp.py |
index e8cbcb016769301209d51af8a4f8283537959b37..cee77054162db03d4214807d4300a4aabaa8dd02 100644 |
--- a/python/musicexp.py |
+++ b/python/musicexp.py |
@@ -1597,10 +1597,19 @@ class ChordNameEvent (Event): |
value += self.duration.ly_expression () |
if self.kind: |
value = self.kind.format(value) |
+ # If there are modifications, we need a ":". This will not be |
+ # the case for plain major chords. |
+ if self.modifications and not ":" in value: |
+ value += ":" |
# First print all additions/changes, and only afterwards all subtractions |
for m in self.modifications: |
if m.type == 1: |
- value += m.ly_expression () |
+ # Additions start with ".", but that requires a trailing |
+ # digit. If none, omit the ".". |
dak
2016/10/07 14:45:53
I think this behavior is wrong since the first dig
|
+ if re.search(r'\d$', value): |
+ value += m.ly_expression () |
+ else: |
+ value += m.ly_expression () [1:] |
for m in self.modifications: |
if m.type == -1: |
value += m.ly_expression () |