diff options
| author | John MacFarlane <[email protected]> | 2023-07-25 08:36:31 -0600 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-07-25 08:36:31 -0600 |
| commit | c06b9ab33147cea8363961929dedbd97f754e5dc (patch) | |
| tree | f97a30ad6f0d3bdd08459bd2658193719dc8a4d5 /src/Text | |
| parent | 5b493c27339574313d5cec69d97a3734f32a46cd (diff) | |
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.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Writers/ChunkedHTML.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/ChunkedHTML.hs b/src/Text/Pandoc/Writers/ChunkedHTML.hs index 73faeb309..a5e51f741 100644 --- a/src/Text/Pandoc/Writers/ChunkedHTML.hs +++ b/src/Text/Pandoc/Writers/ChunkedHTML.hs @@ -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 |
