From 5a7a4451cae6b3149fffa5f06e3004024dd2a33c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 21 Nov 2019 09:21:15 -0800 Subject: TEI writer: don't strip hash from internal links. Closes #5922. --- src/Text/Pandoc/Writers/TEI.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/Text/Pandoc') 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 -- cgit v1.2.3