From 8ba8a720ed582cbed04f15b5ad645db62c348bc5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 8 May 2012 22:04:15 -0700 Subject: DocBook reader: Improved def lists with multiple defs. --- src/Text/Pandoc/Readers/DocBook.hs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index 6a2eedfaf..665d89a6a 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -651,13 +651,11 @@ parseBlock (Elem e) = deflistitems = mapM parseVarListEntry $ filterChildren (named "varlistentry") e parseVarListEntry e' = do - let defs = filterChildren (named "term") e' + let terms = filterChildren (named "term") e' let items = filterChildren (named "listitem") e' - defs' <- mapM ((mconcat <$>) . mapM parseInline) - $ map elContent defs - items' <- mapM ((mconcat <$>) . mapM parseBlock) - $ map elContent items - return (trimInlines $ mconcat $ intersperse (str "; ") defs', items') + terms' <- mapM ((trimInlines . mconcat <$>) . mapM parseInline . elContent) terms + items' <- mapM ((mconcat <$>) . mapM parseBlock . elContent) items + return (mconcat $ intersperse (str "; ") terms', items') getTitle = case filterChild (named "title") e of Just t -> do tit <- getInlines t -- cgit v1.2.3