MediaWiki reader: Support <math> tag.

This commit is contained in:
John MacFarlane
2012-09-12 19:57:34 -07:00
parent def768cd1f
commit b703c76540
3 changed files with 11 additions and 2 deletions
+4 -1
View File
@@ -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")