From def768cd1f15ce1093d6da9ce263b0045db269e2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 12 Sep 2012 19:48:11 -0700 Subject: Added tests for mediawiki lists. --- src/Text/Pandoc/Readers/MediaWiki.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs index ed96d6ccd..3bf4a0cdb 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -44,7 +44,6 @@ _ raw mediawiki: _ templates or anything in {{}} (can be postprocessed) _ category links _ gallery tag? -_ tests for native lists -} module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where @@ -308,7 +307,9 @@ url = do return $ B.link src "" (B.str orig) nowiki :: MWParser Inlines -nowiki = B.text <$> charsInTags "nowiki" +nowiki = B.text . fromEntities <$> try + (htmlTag (~== TagOpen "nowiki" []) *> + manyTill anyChar (htmlTag (~== TagClose "nowiki"))) strikeout :: MWParser Inlines strikeout = B.strikeout <$> (inlinesInTags "strike" <|> inlinesInTags "del") -- cgit v1.2.3