diff options
| author | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-31 10:47:48 -0800 |
|---|---|---|
| committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-31 10:47:48 -0800 |
| commit | e9a270d03b4eb1d7deb807d0bd2a940dde5c9fde (patch) | |
| tree | c9c25da26783a55dd8efd8799319b01e1d9e399f | |
| parent | 38808284155ea83b7287a622759f566ccf884421 (diff) | |
| download | pandoc-e9a270d03b4eb1d7deb807d0bd2a940dde5c9fde.tar.gz | |
Don't include mathml javascript for html5 output.
mathml is supposed to be supported in HTML5.
| -rw-r--r-- | README | 8 | ||||
| -rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 3 |
2 files changed, 6 insertions, 5 deletions
@@ -544,10 +544,10 @@ Math rendering in HTML so it can be cached. `--mathml`[=*URL*] -: Convert TeX math to MathML (works with `docbook` as well as `html`). - In standalone mode, a small javascript (or a link to such a script if a - *URL* is supplied) will be inserted that allows the MathML to be viewed on - some browsers. +: Convert TeX math to MathML (in `docbook` as well as `html` and `html5`). + In standalone `html` output, a small javascript (or a link to such a + script if a *URL* is supplied) will be inserted that allows the MathML to + be viewed on some browsers. `--jsmath`[=*URL*] : Use [jsMath] to display embedded TeX math in HTML output. diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 8ca7aca62..f46d08570 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -147,10 +147,11 @@ pandocToHtml opts (Pandoc (Meta title' authors' date') blocks) = do ! A.type_ "text/javascript" $ mempty _ -> case lookup "mathml-script" (writerVariables opts) of - Just s -> + Just s | not (writerHtml5 opts) -> H.script ! A.type_ "text/javascript" $ preEscapedString ("/*<![CDATA[*/\n" ++ s ++ "/*]]>*/\n") + | otherwise -> mempty Nothing -> mempty else mempty let newvars = [("highlighting-css", |
