diff options
author | John MacFarlane <jgm@berkeley.edu> | 2012-09-12 17:40:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2012-09-12 17:40:40 -0700 |
commit | bbbbee021dc8c511bef922dd2911a65421eaf846 (patch) | |
tree | 80f1bc31e3dcce981b62ffe8dabaf69e872f70f7 /src/Text | |
parent | 57ec347c42f2f5095a6671d1eab564fed0291512 (diff) | |
download | pandoc-bbbbee021dc8c511bef922dd2911a65421eaf846.tar.gz |
MediaWiki reader: Properly handle :, ::, :::...
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/MediaWiki.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs index 6807b470e..7a22d21d4 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -34,7 +34,6 @@ _ tests for lists _ support HTML lists _ support list style attributes and start values in ol lists, also value attribute on li -_ support :, ::, etc. for indent (treat as list continuation paras?) _ support preformatted text (lines starting with space) _ support preformatted text blocks _ code highlighting: http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi <syntaxhighlight lang="php"> (alternativel, <source...>) @@ -207,11 +206,11 @@ listStart c = char c *> notFollowedBy listStartChar listStartChar :: MWParser Char listStartChar = oneOf "*#;:" -anyListStart :: MWParser () -anyListStart = skipMany1 (char '*') - <|> skipMany1 (char '#') - <|> skipMany1 (char ':') - <|> (() <$ char ';') +anyListStart :: MWParser Char +anyListStart = char '*' + <|> char '#' + <|> char ':' + <|> char ';' listItem :: Char -> MWParser Blocks listItem c = try $ do @@ -226,6 +225,7 @@ listItem c = try $ do case c of '*' -> return $ B.bulletList contents '#' -> return $ B.orderedList contents + ':' -> return $ B.definitionList [(mempty, contents)] _ -> mzero listItem' :: Char -> MWParser Blocks |