git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #4271 from dotlambda/lstinline-ampersand

LaTeX writer: escape & in lstinline

commit24acb714c185139ef3a02a7437cd1c64f85c0198 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 16 Jan 2018, 21:30 (9 years ago) parent004f60bb2268b1
1 file changed+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -1015,7 +1015,7 @@ inlineToLaTeX (Code (_,classes,_) str) = do
10151015 let chr = case "!\"&'()*,-./:;?@_" \\ str of
10161016 (c:_) -> c
10171017 [] -> '!'
1018− let str' = escapeStringUsing (backslashEscapes "\\{}%~_") str
1018+ let str' = escapeStringUsing (backslashEscapes "\\{}%~_&") str
10191019 -- we always put lstinline in a dummy 'passthrough' command
10201020 -- (defined in the default template) so that we don't have
10211021 -- to change the way we escape characters depending on whether