diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-11-21 09:21:15 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-11-21 09:21:15 -0800 |
commit | 5a7a4451cae6b3149fffa5f06e3004024dd2a33c (patch) | |
tree | b8017e0005d261d57423d41ff93a9266d1feb2e5 /src/Text/Pandoc | |
parent | a946424e3c5fc249aedc8561b853236947001976 (diff) | |
download | pandoc-5a7a4451cae6b3149fffa5f06e3004024dd2a33c.tar.gz |
TEI writer: don't strip hash from internal links.
Closes #5922.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/TEI.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/TEI.hs b/src/Text/Pandoc/Writers/TEI.hs index 78f7b2cad..a592d4f86 100644 --- a/src/Text/Pandoc/Writers/TEI.hs +++ b/src/Text/Pandoc/Writers/TEI.hs @@ -282,12 +282,8 @@ inlineToTEI opts (Link attr txt (src, _)) linktext <- inlinesToTEI opts txt return $ linktext <+> char '(' <> emailLink <> char ')' | otherwise = - (if "#" `T.isPrefixOf` src - then inTags False "ref" $ ("target", T.drop 1 src) - : idFromAttr opts attr - else inTags False "ref" $ ("target", src) - : idFromAttr opts attr ) <$> - inlinesToTEI opts txt + (inTags False "ref" $ ("target", src) : idFromAttr opts attr) + <$> inlinesToTEI opts txt inlineToTEI opts (Image attr description (src, tit)) = do let titleDoc = if T.null tit then empty |