diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-10-28 09:37:05 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-10-28 09:37:05 -0700 |
commit | 1d53d452c3a2ac81bcf9bd40f31c40a0656706a2 (patch) | |
tree | 2b63a715254c3d4d7d7618c9398784e4906e6a01 /src/Text | |
parent | 3b4d5d26a5000e7dcaea956923d4f8041c801e9b (diff) | |
download | pandoc-1d53d452c3a2ac81bcf9bd40f31c40a0656706a2.tar.gz |
LaTeX writer: add `\protect` to `\hyperlink`.
Thanks to Hadrien Mary for the problem and solution.
Closes #2490.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 9b345fcfe..7cbfce950 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -881,7 +881,7 @@ inlineToLaTeX Space = return space inlineToLaTeX (Link txt ('#':ident, _)) = do contents <- inlineListToLaTeX txt lab <- toLabel ident - return $ text "\\hyperlink" <> braces (text lab) <> braces contents + return $ text "\\protect\\hyperlink" <> braces (text lab) <> braces contents inlineToLaTeX (Link txt (src, _)) = case txt of [Str x] | escapeURI x == src -> -- autolink |