diff --git a/abcfield.py b/abcfield.py index fb4c196..7a4df2e 100755 --- a/abcfield.py +++ b/abcfield.py @@ -136,6 +136,8 @@ def convertAccents(t, latex=False): return res # Convert Title fields from sort to display, so Bat, The->The Bat. +# This only happens for the main title, i.e. the first title in a tune. +# Subtitles are not affected, as they don't influence sort order. def convertTitleToDisplay(t): p = t.rpartition(',') if p[1] == "": @@ -228,7 +230,7 @@ def getFieldDisplayText(lines, dir, field, n = 1, starts = None, latex = False): # Fields that go through Markdown must have HTML entities. mdfield = field.upper() in ['H', 'N']; res = convertAccents(res, False if mdfield else latex) - if field.upper() == "T": + if field.upper() == "T" and n == 1: res = convertTitleToDisplay(res) elif field.upper() == "K": res = convertKeyToDisplay(res)