MediaWiki reader: Allow def list item with just a term.

This commit is contained in:
John MacFarlane
2012-09-15 16:25:51 -04:00
parent c9faa2740b
commit bc29f44d59
+4 -1
View File
@@ -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