summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
diff options
context:
space:
mode:
authorMauro Bieg <mb21@users.noreply.github.com>2017-02-03 09:53:43 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-03 09:53:43 +0100
commit5cd475be7057487ba4f63e2257b6f65b975acd58 (patch)
tree10d2d4d1f698d665c4a35526e163b548af9b4e64 /src/Text/Pandoc/Writers/HTML.hs
parent9327e70c1081f83f60bbc473f60bb25d7cee314a (diff)
HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt (#3398)
closes #3397
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index d1fb3dda7..64eccd35e 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -933,9 +933,11 @@ inlineToHtml opts inline = do
linkText <- inlineListToHtml opts txt
slideVariant <- gets stSlideVariant
let s' = case s of
- '#':xs | slideVariant == RevealJsSlides
- -> '#':'/':xs
- _ -> s
+ '#':xs -> let prefix = if slideVariant == RevealJsSlides
+ then "/"
+ else writerIdentifierPrefix opts
+ in '#' : prefix ++ xs
+ _ -> s
let link = H.a ! A.href (toValue s') $ linkText
let link' = if txt == [Str (unEscapeString s)]
then link ! A.class_ "uri"