aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index db7af223d..2badf2f24 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -78,12 +78,12 @@ latexHeader notes options (Meta title authors date) =
escapeBrackets = backslashEscape "{}"
escapeSpecial = backslashEscape "$%&~_#"
-escapeBackslash = gsub "\\\\" "\\\\textbackslash{}"
-fixBackslash = gsub "\\\\textbackslash\\\\\\{\\\\\\}" "\\\\textbackslash{}"
-escapeHat = gsub "\\^" "\\\\^{}"
-escapeBar = gsub "\\|" "\\\\textbar{}"
-escapeLt = gsub "<" "\\\\textless{}"
-escapeGt = gsub ">" "\\\\textgreater{}"
+escapeBackslash = substitute "\\" "\\textbackslash{}"
+fixBackslash = substitute "\\textbackslash\\{\\}" "\\textbackslash{}"
+escapeHat = substitute "^" "\\^{}"
+escapeBar = substitute "|" "\\textbar{}"
+escapeLt = substitute "<" "\\textless{}"
+escapeGt = substitute ">" "\\textgreater{}"
-- | Escape string for LaTeX
stringToLaTeX :: String -> String