aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/DefaultHeaders.hs3
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/DefaultHeaders.hs b/src/Text/Pandoc/DefaultHeaders.hs
index e9c1f17e5..27fb237c5 100644
--- a/src/Text/Pandoc/DefaultHeaders.hs
+++ b/src/Text/Pandoc/DefaultHeaders.hs
@@ -37,6 +37,7 @@ module Text.Pandoc.DefaultHeaders (
defaultRTFHeader
) where
import Text.Pandoc.Writers.S5
+import Text.Pandoc.Shared
import System.FilePath ( (</>) )
import Text.Pandoc.TH ( contentsOf )
@@ -61,7 +62,7 @@ defaultOpenDocumentHeader = $(contentsOf $ "data" </> "headers" </> "OpenDocume
#endif
defaultS5Header :: String
-defaultS5Header = s5Meta ++ s5CSS ++ s5Javascript
+defaultS5Header = substitute "$" "$$" $ s5Meta ++ s5CSS ++ s5Javascript
defaultRTFHeader :: String
#ifndef __HADDOCK__
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index e0e3882fe..2d1a143ec 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -33,6 +33,7 @@ import Text.Pandoc.Definition
import Text.Pandoc.LaTeXMathML
import Text.Pandoc.CharacterReferences ( decodeCharacterReferences )
import Text.Pandoc.Shared
+import Text.Pandoc.Templates
import Text.Pandoc.Readers.TeXMath
import Text.Pandoc.Highlighting ( highlightHtml, defaultHighlightingCss )
import Text.Pandoc.XML (stripTags)
@@ -135,7 +136,7 @@ writeHtml opts (Pandoc (Meta tit authors date) blocks) =
_ -> noHtml
else noHtml
head' = header $ metadata +++ math +++ css +++
- primHtml (writerHeader opts)
+ primHtml (renderTemplate [] $ writerHeader opts)
notes = reverse (stNotes st')
before = primHtml $ writerIncludeBefore opts
after = primHtml $ writerIncludeAfter opts