git.iko.soy/typeable/pandoc
on master help sign in
MediaWiki reader: Treat "references" tag as block.
387308dJohn MacFarlane
src/Text/Pandoc/Readers/MediaWiki.hs+2−5
@@ -30,10 +30,7 @@ Conversion of mediawiki text to 'Pandoc' document.
30-}
30-}
31{-
31{-
32TODO:
32TODO:
33−_ wikipedia {{cite}} tags
33+_ parse templates?
34−_ <references /> {{Reflist}}
35−_ support tables http://www.mediawiki.org/wiki/Help:Tables
36−- footnotes?
37-}
34-}
38module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where
35module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where
39
36
@@ -101,7 +98,7 @@ sym :: String -> MWParser ()
101sym s = () <$ try (string s)
98sym s = () <$ try (string s)
102
99
103newBlockTags :: [String]
100newBlockTags :: [String]
104−newBlockTags = ["haskell","syntaxhighlight","source","gallery"]
101+newBlockTags = ["haskell","syntaxhighlight","source","gallery","references"]
105
102
106isBlockTag' :: Tag String -> Bool
103isBlockTag' :: Tag String -> Bool
107isBlockTag' tag@(TagOpen t _) = (isBlockTag tag || t `elem` newBlockTags) &&
104isBlockTag' tag@(TagOpen t _) = (isBlockTag tag || t `elem` newBlockTags) &&