git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: change braced backtick to \textasciigrave{}
581fc01Jesse Rosenthal
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -276,7 +276,7 @@ stringToLaTeX ctx (x:xs) = do
276 '€' -> "\\euro{}" ++ rest
276 '€' -> "\\euro{}" ++ rest
277 '{' -> "\\{" ++ rest
277 '{' -> "\\{" ++ rest
278 '}' -> "\\}" ++ rest
278 '}' -> "\\}" ++ rest
279− '`' | ctx == CodeString -> "{`}" ++ rest
279+ '`' | ctx == CodeString -> "\\textasciigrave{}" ++ rest
280 '$' | not isUrl -> "\\$" ++ rest
280 '$' | not isUrl -> "\\$" ++ rest
281 '%' -> "\\%" ++ rest
281 '%' -> "\\%" ++ rest
282 '&' -> "\\&" ++ rest
282 '&' -> "\\&" ++ rest
tests/Tests/Writers/LaTeX.hs+1−1
@@ -76,6 +76,6 @@ tests = [ testGroup "code blocks"
76 , "single quotes" =:
76 , "single quotes" =:
77 code "dog's" =?> "\\texttt{dog\\textquotesingle{}s}"
77 code "dog's" =?> "\\texttt{dog\\textquotesingle{}s}"
78 , "backtick" =:
78 , "backtick" =:
79− code "`nu?`" =?> "\\texttt{{`}nu?{`}}"
79+ code "`nu?`" =?> "\\texttt{\\textasciigrave{}nu?\\textasciigrave{}}"
80 ]
80 ]
81 ]
81 ]