Skip to content

Commit

Permalink
Merge pull request #4271 from dotlambda/lstinline-ampersand
Browse files Browse the repository at this point in the history
LaTeX writer: escape & in lstinline
  • Loading branch information
jgm authored Jan 17, 2018
2 parents 004f60b + b2268b1 commit 24acb71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Writers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24acb71

Please sign in to comment.