git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: add `#` special characeters for listings.

This character needs special handling in lstinline. Closes #4939.

commit2e7cfe1bbaa522fda0f79ecc6e5fb4ea3653f2d6 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 25 Jan 2019, 16:49 (8 years ago) parent7ccaa77
1 file changed+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -1136,7 +1136,7 @@ inlineToLaTeX (Code (_,classes,_) str) = do
11361136 let chr = case "!\"'()*,-./:;?@" \\ str of
11371137 (c:_) -> c
11381138 [] -> '!'
1139− let str' = escapeStringUsing (backslashEscapes "\\{}%~_&") str
1139+ let str' = escapeStringUsing (backslashEscapes "\\{}%~_&#") str
11401140 -- we always put lstinline in a dummy 'passthrough' command
11411141 -- (defined in the default template) so that we don't have
11421142 -- to change the way we escape characters depending on whether