aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-03-17 14:25:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-03-17 14:25:05 -0700
commit605545e02440c14d8b3a493b304616613efceec8 (patch)
treea610d989cf4eec01464bf9c657d5fa0d2d72e3cd /src/Text/Pandoc
parent2eba15c181639f893f647c45c7b43b352e14bc98 (diff)
downloadpandoc-605545e02440c14d8b3a493b304616613efceec8.tar.gz
Work around Monoid/Semigroup-related compiler errors GHC 7.10.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 0af5d7d2f..6e04abd52 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -276,17 +276,15 @@ pandocToHtml opts (Pandoc meta blocks) = do
H.script ! A.src (toValue url)
! A.type_ "text/javascript"
$ mempty
- KaTeX url ->
- (H.script !
- A.src (toValue $ url ++ "katex.min.js") $ mempty) <>
- (H.script !
- A.src (toValue $ url ++ "contrib/auto-render.min.js")
- $ mempty) <>
- (
- H.script
- "document.addEventListener(\"DOMContentLoaded\", function() {\n renderMathInElement(document.body);\n});") <>
- (H.link ! A.rel "stylesheet" !
- A.href (toValue $ url ++ "katex.min.css"))
+ KaTeX url -> do
+ H.script !
+ A.src (toValue $ url ++ "katex.min.js") $ mempty
+ H.script !
+ A.src (toValue $ url ++ "contrib/auto-render.min.js") $ mempty
+ H.script
+ "document.addEventListener(\"DOMContentLoaded\", function() {\n renderMathInElement(document.body);\n});"
+ H.link ! A.rel "stylesheet" !
+ A.href (toValue $ url ++ "katex.min.css")
_ -> case lookup "mathml-script" (writerVariables opts) of
Just s | not (stHtml5 st) ->
@@ -961,8 +959,9 @@ inlineToHtml opts inline = do
WrapNone -> preEscapedString " "
WrapAuto -> preEscapedString " "
WrapPreserve -> preEscapedString "\n"
- LineBreak -> return $ (if html5 then H5.br else H.br)
- <> strToHtml "\n"
+ LineBreak -> return $ do
+ if html5 then H5.br else H.br
+ strToHtml "\n"
(Span (id',classes,kvs) ils)
-> inlineListToHtml opts ils >>=
addAttrs opts attr' . H.span