aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2014-12-11 20:14:23 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2014-12-15 21:35:47 +0000
commita17f6f2f39c2bcd0bc1a788f49c1cc0c08102874 (patch)
tree3f0326ce874e57d1648448f339e8b2cd82b8289d /src/Text/Pandoc
parent58e4e4a608de489f993c36234048014d93b39116 (diff)
downloadpandoc-a17f6f2f39c2bcd0bc1a788f49c1cc0c08102874.tar.gz
Text.Pandoc.Readers.HTML: Retain display type of MathML output
Closes #1719
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index e261cfca8..1760ee006 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -60,7 +60,7 @@ import qualified Text.Blaze.XHtml1.Transitional.Attributes as A
import Text.Blaze.Renderer.String (renderHtml)
import Text.TeXMath
import Text.XML.Light.Output
-import Text.XML.Light (unode, elChildren, add_attr, unqual)
+import Text.XML.Light (unode, elChildren, unqual)
import qualified Text.XML.Light as XML
import System.FilePath (takeExtension)
import Data.Monoid
@@ -639,7 +639,9 @@ annotateMML e tex = math (unode "semantics" [cs, unode "annotation" (annotAttrs,
[] -> unode "mrow" ()
[x] -> x
xs -> unode "mrow" xs
- math = add_attr (XML.Attr (unqual "xmlns") "http://www.w3.org/1998/Math/MathML") . unode "math"
+ math childs = XML.Element q as [XML.Elem childs] l
+ where
+ (XML.Element q as _ l) = e
annotAttrs = [XML.Attr (unqual "encoding") "application/x-tex"]