From 4ae376f2c7ba9621479640afbe45936c6c859cff Mon Sep 17 00:00:00 2001 From: Wenzhuo Liu Date: Fri, 17 May 2024 16:35:51 +0800 Subject: Fix raw block has extra space when end with backtick (#4162) Co-authored-by: Laurenz --- .../ref/issue-3820-raw-space-when-end-with-backtick.png | Bin 0 -> 351 bytes tests/suite/text/raw.typ | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/ref/issue-3820-raw-space-when-end-with-backtick.png (limited to 'tests') diff --git a/tests/ref/issue-3820-raw-space-when-end-with-backtick.png b/tests/ref/issue-3820-raw-space-when-end-with-backtick.png new file mode 100644 index 00000000..1ba3fb18 Binary files /dev/null and b/tests/ref/issue-3820-raw-space-when-end-with-backtick.png differ diff --git a/tests/suite/text/raw.typ b/tests/suite/text/raw.typ index dce77fdb..6a3ea6bd 100644 --- a/tests/suite/text/raw.typ +++ b/tests/suite/text/raw.typ @@ -624,7 +624,20 @@ fn main() { ~~~~The~spaces~on~this~line~shrink +--- issue-3820-raw-space-when-end-with-backtick --- +```typ +`code` +``` + + ```typ + `code` + ``` + --- raw-unclosed --- -// Unterminated. +// Test unterminated raw text. +// +// Note: This test should be the final one in the file because it messes up +// syntax highlighting. +// // Error: 1-2:1 unclosed raw text `endless -- cgit v1.2.3