diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 9 |
1 files 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 |