git.iko.soy/typeable/pandoc
on master help sign in
RST reader: Don't create empty definition list for metadata field lists.
31435adJohn MacFarlane
src/Text/Pandoc/Readers/RST.hs+3−3
@@ -193,9 +193,9 @@ fieldList :: RSTParser Blocks
193fieldList = try $ do
193fieldList = try $ do
194 indent <- lookAhead $ many spaceChar
194 indent <- lookAhead $ many spaceChar
195 items <- many1 $ fieldListItem indent
195 items <- many1 $ fieldListItem indent
196− if null items
196+ case catMaybes items of
197− then return mempty
197+ [] -> return mempty
198− else return $ B.definitionList $ catMaybes items
198+ items' -> return $ B.definitionList items'
199
199
200--
200--
201-- line block
201-- line block