diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Tests/Writers/ConTeXt.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/Tests/Writers/ConTeXt.hs b/src/Tests/Writers/ConTeXt.hs index 506ff698f..beb6411f0 100644 --- a/src/Tests/Writers/ConTeXt.hs +++ b/src/Tests/Writers/ConTeXt.hs @@ -33,7 +33,7 @@ infix 4 =: tests :: [Test] tests = [ testGroup "inline code" - [ "with '}'" =: code "}" =?> "\\mono{\\letterclosebrace{}}" + [ "with '}'" =: code "}" =?> "\\mono{\\}}" , "without '}'" =: code "]" =?> "\\type{]}" , property "code property" $ \s -> null s || if '{' `elem` s || '}' `elem` s diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 4514199b5..964320eb2 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -90,18 +90,14 @@ escapeCharForConTeXt :: WriterOptions -> Char -> String escapeCharForConTeXt opts ch = let ligatures = writerTeXLigatures opts in case ch of - '{' -> "\\letteropenbrace{}" - '}' -> "\\letterclosebrace{}" + '{' -> "\\{" + '}' -> "\\}" '\\' -> "\\letterbackslash{}" '$' -> "\\$" '|' -> "\\letterbar{}" - '^' -> "\\letterhat{}" '%' -> "\\letterpercent{}" '~' -> "\\lettertilde{}" - '&' -> "\\&" '#' -> "\\#" - '<' -> "\\letterless{}" - '>' -> "\\lettermore{}" '[' -> "{[}" ']' -> "{]}" '\160' -> "~" |