aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-04-20 10:40:44 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-04-20 10:40:44 -0700
commit2ebfa8894787d656ee357946e83e8ea03f1e3031 (patch)
tree6037d08d9b87ce754643b8b939b693133b75d6f3 /src/Text
parentb6d530d8764642dc2f0c0373a6569bd0c0270dc1 (diff)
downloadpandoc-2ebfa8894787d656ee357946e83e8ea03f1e3031.tar.gz
Stylistic changes to DocBook reader.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs9
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