forked from CryHavoc/dottes
Add subtitle if present in tune links.
This commit is contained in:
parent
98f0d36349
commit
02b29f13f3
|
@ -181,7 +181,12 @@ def expandCustomMarkdown(t, dir, latex):
|
|||
fname = m.group(1) + ".abc"
|
||||
path = pathlib.Path(dir, fname)
|
||||
with path.open() as f:
|
||||
return "[" + getFieldDisplayText(f, dir, "T", latex) + "](" + fname + ")"
|
||||
title = getFieldDisplayText(f, dir, "T", latex=latex)
|
||||
f.seek(0)
|
||||
subtitle = getFieldDisplayText(f, dir, "T", n=2, latex=latex)
|
||||
if len(subtitle) > 0:
|
||||
title = title + " (" + subtitle + ")"
|
||||
return "[" + title + "](" + fname + ")"
|
||||
return re.sub(r'<(.*?).abc>', getTitle, t)
|
||||
|
||||
# Return the raw text for a given field. Optionally the nth field is taken,
|
||||
|
|
Loading…
Reference in New Issue