mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-28 18:35:49 +00:00
ChunkedHTML writer: Fix regression including mathjax script.
The fix for #8620 caused the mathjax script to be included when the table of contents but not the body text of a page contains math. But it broke the case where the table of contents doesn't contain math but the page does. This patch fixes the issue. Closes #8967.
This commit is contained in:
@@ -94,7 +94,7 @@ writeChunkedHTML opts (Pandoc meta blocks) = do
|
||||
Left e -> throwError $ PandocTemplateError (T.pack e)
|
||||
Right t -> return t
|
||||
tocMathVariable <- writeHtml5String opts{ writerTemplate = Just mathVar }
|
||||
(Pandoc nullMeta [tree])
|
||||
(Pandoc meta (tree:blocks))
|
||||
let opts' = opts{ writerVariables =
|
||||
defField "table-of-contents" renderedTOC
|
||||
. defField "math" tocMathVariable
|
||||
|
||||
Reference in New Issue
Block a user