From c06b9ab33147cea8363961929dedbd97f754e5dc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 25 Jul 2023 08:36:31 -0600 Subject: 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. --- src/Text/Pandoc/Writers/ChunkedHTML.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') 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 -- cgit v1.2.3