Merge pull request #4271 from dotlambda/lstinline-ampersand

LaTeX writer: escape & in lstinline
This commit is contained in:
John MacFarlane 2018-01-16 21:30:22 -07:00 committed by GitHub
commit 24acb714c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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