git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: escape ~ in code with --listings.

Closes #4111.

commit29ec13184ddb869038ca712e260e8a135992c8e9 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 1 Dec 2017, 17:17 (9 years ago) parentb2a1905
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