aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-18 16:53:36 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-18 16:53:36 -0700
commit6be8f4e953b6ba9a7af1b707ef3902f8a5b7b8e2 (patch)
tree9016c8253ac75ac894cf90594e31fd603faebf32 /src/Text/Pandoc
parentc57649956d94f47f37c85b58be6978b2f989acae (diff)
downloadpandoc-6be8f4e953b6ba9a7af1b707ef3902f8a5b7b8e2.tar.gz
Improved fix to #5340 and added test.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index fd1606c41..bee68bd53 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -1219,12 +1219,12 @@ inlineToLaTeX (Link _ txt ('#':ident, _)) = do
return $ text "\\protect\\hyperlink" <> braces (text lab) <> braces contents
inlineToLaTeX (Link _ txt (src, _)) =
case txt of
- [Str x] | x == unEscapeString src -> -- autolink
+ [Str x] | unEscapeString x == unEscapeString src -> -- autolink
do modify $ \s -> s{ stUrl = True }
src' <- stringToLaTeX URLString (escapeURI src)
return $ text $ "\\url{" ++ src' ++ "}"
[Str x] | Just rest <- stripPrefix "mailto:" src,
- x == unEscapeString rest -> -- email autolink
+ unEscapeString x == unEscapeString rest -> -- email autolink
do modify $ \s -> s{ stUrl = True }
src' <- stringToLaTeX URLString (escapeURI src)
contents <- inlineListToLaTeX txt