diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-01 17:17:26 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-01 17:17:26 -0800 |
commit | 29ec13184ddb869038ca712e260e8a135992c8e9 (patch) | |
tree | 3540936a100e5a2de5a12e71d9c8ca2d47e69959 | |
parent | b2a190546d9f8bbc853b5e65539093275252e0ef (diff) | |
download | pandoc-29ec13184ddb869038ca712e260e8a135992c8e9.tar.gz |
LaTeX writer: escape ~ in code with --listings.
Closes #4111.
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 8620f989b..70744bde3 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -1013,7 +1013,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 |