Fix full title text in markdown - getFullTitle() needs a list of lines.

This commit is contained in:
Jim Hague 2017-10-11 18:05:32 +01:00
parent 127c0380db
commit cd56cd0bc5
1 changed files with 2 additions and 1 deletions

View File

@ -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,