From 7c35a540d130d21623eb15b8558f4fc2d8a97842 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 11 Aug 2026 09:24:54 -0700 Subject: [PATCH] Revert "Typst writer: fix escaping of quotes." This reverts commit 04848401d5711d0da74e6e32a7aedc6c2d661a71. However, we retain the test for #11463, which didn't actually need the reverted commit. Closes #11788. --- src/Text/Pandoc/Writers/Typst.hs | 6 ------ test/command/11788.md | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 test/command/11788.md diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs index 81dbfdb2e..374985733 100644 --- a/src/Text/Pandoc/Writers/Typst.hs +++ b/src/Text/Pandoc/Writers/Typst.hs @@ -637,19 +637,13 @@ escapeTypst smart context t = | otherwise = (c, T.snoc t' c) escapeChar c | c == '\160' = "~" - | c == '\8216', smart = "'" -- left quote | c == '\8217', smart = "'" -- apostrophe - | c == '\8220', smart = "\"" -- left double quote - | c == '\8221', smart = "\"" -- right double quote | c == '\8212', smart = "---" -- em dash | c == '\8211', smart = "--" -- en dash | needsEscape c = "\\" <> T.singleton c | otherwise = T.singleton c needsEscape '\160' = True - needsEscape '\8216' = smart needsEscape '\8217' = smart - needsEscape '\8220' = smart - needsEscape '\8221' = smart needsEscape '\8212' = smart needsEscape '\8211' = smart needsEscape '\'' = smart diff --git a/test/command/11788.md b/test/command/11788.md new file mode 100644 index 000000000..405315ebf --- /dev/null +++ b/test/command/11788.md @@ -0,0 +1,6 @@ +``` +% pandoc -t typst +„test“ +^D +„test“ +```