aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMauro Bieg <mb21@users.noreply.github.com>2020-09-20 01:13:50 +0200
committerGitHub <noreply@github.com>2020-09-19 16:13:50 -0700
commitcaa225ad8216d704afe1b857f552307e490c1a14 (patch)
treed26c96108d7223c086a7bb194020f5540319608e /src
parentd5a7abd47f0862c51bc7ce8349e4290ad1c24546 (diff)
downloadpandoc-caa225ad8216d704afe1b857f552307e490c1a14.tar.gz
Add CSS to default HTML template (#6601)
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs2
1 files changed, 2 insertions, 0 deletions
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