# HG changeset patch # User Jim Hague # Date 1553324400 0 # Node ID e757621e760bbb2e764052991642d40bcef3979e # Parent 6bd946700312d5d5460b1041490c2d9a6e35d7a4# Parent 86bfd138afb4c8d8056bb1f2a160e5479d6e460b Merge with upstream. diff -r 86bfd138afb4 -r e757621e760b abcfield.py --- a/abcfield.py Fri Mar 22 23:25:13 2019 +0000 +++ b/abcfield.py Sat Mar 23 07:00:00 2019 +0000 @@ -136,6 +136,8 @@ 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 @@ # 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)