git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: escape `_` in code with --listings.
commit22eb15ec3521fefdeaa93cb6fa02931afb602fe0 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 2 Dec 2017, 10:31 (9 years ago) parentecfb5a0
1 file changed+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -1013,7 +1013,7 @@ inlineToLaTeX (Code (_,classes,_) str) = do
10131013 let chr = case "!\"&'()*,-./:;?@_" \\ str of
10141014 (c:_) -> c
10151015 [] -> '!'
1016− let str' = escapeStringUsing (backslashEscapes "\\{}%~") str
1016+ let str' = escapeStringUsing (backslashEscapes "\\{}%~_") str
10171017 -- we always put lstinline in a dummy 'passthrough' command
10181018 -- (defined in the default template) so that we don't have
10191019 -- to change the way we escape characters depending on whether