From 2ebfa8894787d656ee357946e83e8ea03f1e3031 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 20 Apr 2012 10:40:44 -0700 Subject: Stylistic changes to DocBook reader. --- src/Text/Pandoc/Readers/DocBook.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index 8fe9797a8..30a1cd7ee 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -599,10 +599,11 @@ parseInline (Elem e) = (fromMaybe "" (lookupAttrBy (\attr -> qName attr == "url") (elAttribs e))) "" <$> innerInlines "link" -> case findAttr (QName "href" Nothing $ Just "xlink") e of - Just href -> link href "" <$> innerInlines - _ -> link ("#"++(fromMaybe "" (lookupAttrBy - (\attr -> qName attr == "linkend") - (elAttribs e)))) "" <$> innerInlines + Just href -> link href "" <$> innerInlines + _ -> link ('#':anchor) "" <$> innerInlines + where anchor = fromMaybe "" $ lookupAttrBy + (\attr -> qName attr == "linkend") + (elAttribs e) "emphasis" -> case lookupAttrBy (\attr -> qName attr == "role") (elAttribs e) of Just "strong" -> strong <$> innerInlines -- cgit v1.2.3