From 2e7cfe1bbaa522fda0f79ecc6e5fb4ea3653f2d6 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 25 Jan 2019 16:49:31 -0800 Subject: LaTeX writer: add `#` special characeters for listings. This character needs special handling in lstinline. Closes #4939. --- src/Text/Pandoc/Writers/LaTeX.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index c9751e885..bd48d50a6 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -1136,7 +1136,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 -- cgit v1.2.3