aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-09-15 16:24:55 -0400
committerJohn MacFarlane <jgm@berkeley.edu>2012-09-15 16:25:51 -0400
commitbc29f44d5970d87a7ed28d4008debae3e2cb724c (patch)
tree29d86bf5bf52c323c4033f7ca1e7fa27b4bec282 /src
parentc9faa2740b5ab632a2dce3965ea8a3719407933b (diff)
downloadpandoc-bc29f44d5970d87a7ed28d4008debae3e2cb724c.tar.gz
MediaWiki reader: Allow def list item with just a term.
Diffstat (limited to 'src')
-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 e65a4dc70..51fc845a3 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -367,7 +367,10 @@ definitionList = B.definitionList <$> many1 defListItem
defListItem :: MWParser (Inlines, [Blocks])
defListItem = try $ do
terms <- mconcat . intersperse B.linebreak <$> many defListTerm
- defs <- many1 $ listItem ':'
+ -- we allow dd with no dt, or dt with no dd
+ defs <- if B.isNull terms
+ then many1 $ listItem ':'
+ else many $ listItem ':'
return (terms, defs)
defListTerm :: MWParser Inlines