summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-01-16 21:30:22 -0700
committerGitHub <noreply@github.com>2018-01-16 21:30:22 -0700
commit24acb714c185139ef3a02a7437cd1c64f85c0198 (patch)
tree749de1581e6ac524dbf0712b553435c713e8a017
parent004f60bf265f7e76ca59ea49ae1070e8d09d1ce7 (diff)
parentb2268b1fc743904903cec5e1a78bc1fe10ed62b5 (diff)
Merge pull request #4271 from dotlambda/lstinline-ampersand
LaTeX writer: escape & in lstinline
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 49b39f014..de2cc3480 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -1015,7 +1015,7 @@ inlineToLaTeX (Code (_,classes,_) str) = do
let chr = case "!\"&'()*,-./:;?@_" \\ str of
(c:_) -> c
[] -> '!'
- let str' = escapeStringUsing (backslashEscapes "\\{}%~_") str
+ let str' = escapeStringUsing (backslashEscapes "\\{}%~_&") str
-- we always put lstinline in a dummy 'passthrough' command
-- (defined in the default template) so that we don't have
-- to change the way we escape characters depending on whether