From d8dc57d91c14f819a896a005f92ee41aaeaa935e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 5 May 2012 19:34:39 -0700 Subject: DocBook reader: Support email tag. --- src/Text/Pandoc/Readers/DocBook.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index cfc7fb8ff..c6169551d 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -114,7 +114,7 @@ List of all DocBook tags, with [x] indicating implemented, [ ] destructorsynopsis - A syntax summary for a destructor [ ] edition - The name or number of an edition of a document [ ] editor - The name of the editor of a document -[ ] email - An email address +[x] email - An email address [x] emphasis - Emphasized text [ ] entry - A cell in a table [ ] entrytbl - A subtable appearing in place of an Entry in a table @@ -675,6 +675,8 @@ parseInline (Elem e) = "constant" -> return $ codeWith ("",["constant"],[]) $ strContent e "userinput" -> return $ codeWith ("",["userinput"],[]) $ strContent e "varargs" -> return $ str "(…)" + "email" -> return $ link ("mailto:" ++ strContent e) "" + $ code $ strContent e "ulink" -> link (attrValue "url" e) "" <$> innerInlines "link" -> case findAttr (QName "href" (Just "http://www.w3.org/1999/xlink") Nothing) e of Just href -> link href "" <$> innerInlines -- cgit v1.2.3