From cd56cd0bc557f4dd582eafa71f2f40dcf15207b6 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Wed, 11 Oct 2017 18:05:32 +0100 Subject: [PATCH] Fix full title text in markdown - getFullTitle() needs a list of lines. --- abcfield.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/abcfield.py b/abcfield.py index 3b15c72..095c0bb 100755 --- a/abcfield.py +++ b/abcfield.py @@ -185,7 +185,8 @@ def expandCustomMarkdown(t, dir, latex): fname = m.group(1) + ".abc" path = pathlib.Path(dir, fname) with path.open() as f: - return "[" + getFullTitle(f, dir, latex=latex) + "](" + fname + ")" + lines = f.readlines() + return "[" + getFullTitle(lines, dir, latex=latex) + "](" + fname + ")" return re.sub(r'<(.*?).abc>', getTitleLink, t) # Return the raw text for a given field. Optionally the nth field is taken,