Skip to content

Commit

Permalink
LaTeX writer: backslash-escape # in URLs. Closes #9014.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Aug 23, 2023
1 parent 54b9eeb commit 7c43546
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Text/Pandoc/Writers/LaTeX/Util.hs
Expand Up @@ -93,6 +93,7 @@ stringToLaTeX context zs = do
_ -> cs <> xs
in case x of
'\\'| isUrl -> emitc '/' -- NB. / works as path sep even on Windows
'#' | isUrl -> emits "\\#" -- see #9014
c | isUrl ->
if c `elem` ['{', '}', '|', '^', '~', '[', ']', '`']
then emits (escapeURIString (const False) [c])
Expand Down

0 comments on commit 7c43546

Please sign in to comment.