git.iko.soy/typeable/pandoc
on master help sign in
TEI writer: don't strip hash from internal links.

Closes #5922.

commit5a7a4451cae6b3149fffa5f06e3004024dd2a33c authorJohn MacFarlane <jgm@berkeley.edu> dateThu 21 Nov 2019, 09:21 (7 years ago) parenta946424
1 file changed+2−6
src/Text/Pandoc/Writers/TEI.hs+2−6
src/Text/Pandoc/Writers/TEI.hs+2−6
@@ -282,12 +282,8 @@ inlineToTEI opts (Link attr txt (src, _))
282282 linktext <- inlinesToTEI opts txt
283283 return $ linktext <+> char '(' <> emailLink <> char ')'
284284 | otherwise =
285− (if "#" `T.isPrefixOf` src
286− then inTags False "ref" $ ("target", T.drop 1 src)
287− : idFromAttr opts attr
288− else inTags False "ref" $ ("target", src)
289− : idFromAttr opts attr ) <$>
290− inlinesToTEI opts txt
285+ (inTags False "ref" $ ("target", src) : idFromAttr opts attr)
286+ <$> inlinesToTEI opts txt
291287inlineToTEI opts (Image attr description (src, tit)) = do
292288 let titleDoc = if T.null tit
293289 then empty