diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index ce77184e8..dec6d3118 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -171,12 +171,8 @@ elementToLaTeX opts (Sec level _ id' title' elements) = do -- escape things as needed for LaTeX stringToLaTeX :: Bool -> String -> String stringToLaTeX isUrl = escapeStringUsing latexEscapes - where latexEscapes = backslashEscapes "{}$%&_" ++ - if isUrl - then [] - else [ ('~', "\\ensuremath{\\sim}") - , ('#', "\\#") - ] ++ + where latexEscapes = backslashEscapes "{}$%&_#" ++ + [ ('~', "\\ensuremath{\\sim}") | not isUrl ] ++ [ ('^', "\\^{}") , ('\\', "\\textbackslash{}") , ('€', "\\euro{}") |