From caa225ad8216d704afe1b857f552307e490c1a14 Mon Sep 17 00:00:00 2001 From: Mauro Bieg Date: Sun, 20 Sep 2020 01:13:50 +0200 Subject: Add CSS to default HTML template (#6601) --- src/Text/Pandoc/Writers/HTML.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 8162da66a..b40765145 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -310,6 +310,7 @@ pandocToHtml opts (Pandoc meta blocks) = do "/*]]>*/\n") | otherwise -> mempty Nothing -> mempty + let mCss :: Maybe [Text] = lookupContext "css" $ metadata let context = (if stHighlighting st then case writerHighlightStyle opts of Just sty -> defField "highlighting-css" @@ -328,6 +329,7 @@ pandocToHtml opts (Pandoc meta blocks) = do PlainMath -> defField "displaymath-css" True WebTeX _ -> defField "displaymath-css" True _ -> id) $ + defField "document-css" (isNothing mCss && slideVariant == NoSlides) $ defField "quotes" (stQuotes st) $ -- for backwards compatibility we populate toc -- with the contents of the toc, rather than a -- cgit v1.2.3