git.iko.soy/typeable/pandoc
on master help sign in
Don't include mathml javascript for html5 output.

mathml is supposed to be supported in HTML5.

commite9a270d03b4eb1d7deb807d0bd2a940dde5c9fde authorJohn MacFarlane <fiddlosopher@gmail.com> dateTue 31 Jan 2012, 10:47 (15 years ago) parent3880828
2 files changed+6−5
README+4−4 src/Text/Pandoc/Writers/HTML.hs+2−1
README+4−4
@@ -544,10 +544,10 @@ Math rendering in HTML
544544 so it can be cached.
545545
546546`--mathml`[=*URL*]
547−: Convert TeX math to MathML (works with `docbook` as well as `html`).
548− In standalone mode, a small javascript (or a link to such a script if a
549− *URL* is supplied) will be inserted that allows the MathML to be viewed on
550− some browsers.
547+: Convert TeX math to MathML (in `docbook` as well as `html` and `html5`).
548+ In standalone `html` output, a small javascript (or a link to such a
549+ script if a *URL* is supplied) will be inserted that allows the MathML to
550+ be viewed on some browsers.
551551
552552`--jsmath`[=*URL*]
553553: Use [jsMath] to display embedded TeX math in HTML output.
src/Text/Pandoc/Writers/HTML.hs+2−1
@@ -147,10 +147,11 @@ pandocToHtml opts (Pandoc (Meta title' authors' date') blocks) = do
147147 ! A.type_ "text/javascript"
148148 $ mempty
149149 _ -> case lookup "mathml-script" (writerVariables opts) of
150− Just s ->
150+ Just s | not (writerHtml5 opts) ->
151151 H.script ! A.type_ "text/javascript"
152152 $ preEscapedString
153153 ("/*<![CDATA[*/\n" ++ s ++ "/*]]>*/\n")
154+ | otherwise -> mempty
154155 Nothing -> mempty
155156 else mempty
156157 let newvars = [("highlighting-css",