From e2c3a7b896b076a218d94b9b0840599d399b0618 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 14 Apr 2012 22:16:20 -0700 Subject: Implemented abstract, constant, type, etc. in docbook reader. --- src/Text/Pandoc/Readers/DocBook.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index cfd7a6e58..8da933a2f 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -47,6 +47,7 @@ parseBlock (Elem e) = "sect5" -> sect 5 "sect6" -> sect 6 "section" -> gets dbSectionLevel >>= sect . (+1) + "abstract" -> blockQuote <$> getBlocks e "itemizedlist" -> bulletList <$> listitems "orderedlist" -> orderedList <$> listitems -- TODO list attributes "articleinfo" -> getTitle >> getAuthors >> getDate >> return mempty @@ -107,6 +108,13 @@ parseInline (Elem e) = then singleQuoted contents else doubleQuoted contents "literal" -> return $ code $ strContent e -- TODO attrs + "varname" -> return $ codeWith ("",["varname"],[]) $ strContent e + "function" -> return $ codeWith ("",["function"],[]) $ strContent e + "type" -> return $ codeWith ("",["type"],[]) $ strContent e + "symbol" -> return $ codeWith ("",["symbol"],[]) $ strContent e + "constant" -> return $ codeWith ("",["constant"],[]) $ strContent e + "userinput" -> return $ codeWith ("",["userinput"],[]) $ strContent e + "varargs" -> return $ str "(…)" "ulink" -> link (fromMaybe "" (lookupAttrBy (\attr -> qName attr == "url") (elAttribs e))) "" <$> innerInlines -- cgit v1.2.3