aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-09-12 19:54:56 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-09-12 19:57:34 -0700
commitb703c76540ebdfd026d4bd3c48bb3f03dd459d2b (patch)
tree0571f8ba84dd99bf61abee08bb4410a9897f749f /src/Text/Pandoc
parentdef768cd1f15ce1093d6da9ce263b0045db269e2 (diff)
downloadpandoc-b703c76540ebdfd026d4bd3c48bb3f03dd459d2b.tar.gz
MediaWiki reader: Support `<math>` tag.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index 3bf4a0cdb..8805d528a 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -39,7 +39,6 @@ _ support internal links http://www.mediawiki.org/wiki/Help:Links
_ support external links (partially implemented)
_ support images http://www.mediawiki.org/wiki/Help:Images
_ support tables http://www.mediawiki.org/wiki/Help:Tables
-_ support <math> tag for latex math
_ raw mediawiki:
_ templates or anything in {{}} (can be postprocessed)
_ category links
@@ -259,6 +258,7 @@ inline = whitespace
<|> strikeout
<|> subscript
<|> superscript
+ <|> math
<|> code
<|> hask
<|> B.singleton <$> charRef
@@ -320,6 +320,9 @@ superscript = B.superscript <$> inlinesInTags "sup"
subscript :: MWParser Inlines
subscript = B.subscript <$> inlinesInTags "sub"
+math :: MWParser Inlines
+math = B.math <$> charsInTags "math"
+
code :: MWParser Inlines
code = B.code <$> (charsInTags "code" <|> charsInTags "tt")