Files `site/doc/{1.0,1.1}/hledger-ui.md` had to be treated specially because
thay had some other elements inside the same `BulletList` that the `toc` lived
inside. Because only the first element of the `BulletList` is compared, these
extra HTML elements were either dropped or replaced with a TOC at compile time.
By switching to the meta-inline `\$toc\$`, they started to persist into the
resulting HTML. The fix was to drop them from the source markdown.
7 lines
226 B
Lua
7 lines
226 B
Lua
function Para(p)
|
|
if not p.content[1] then return p end
|
|
if not (p.content[1].t == "Str") then return p end
|
|
if not (p.content[1].text == "$toc$") then return p end
|
|
return pandoc.Null()
|
|
end
|