diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-05-08 22:04:15 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-05-08 22:18:24 -0700 |
commit | 8ba8a720ed582cbed04f15b5ad645db62c348bc5 (patch) | |
tree | a49b6f2178239d14aa8fea0b953d05aa4eda33c3 /src/Text/Pandoc | |
parent | b1cba4ae8e3380e711a850256eb29063c8d91844 (diff) |
DocBook reader: Improved def lists with multiple defs.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 10 |
1 files changed, 4 insertions, 6 deletions
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 |