summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYip Coekjan <69834864+Coekjan@users.noreply.github.com>2024-08-16 03:53:15 +0800
committerGitHub <noreply@github.com>2024-08-15 19:53:15 +0000
commitccd45241061be149687aec04db43dec96d8a961d (patch)
tree655412b00ef7072427956996e1eb4540e17459dc /tests
parent351bac8b688ea0f3161e268a04192a6546f2703a (diff)
Fix lexer on sth followed by comments (#4739)
Diffstat (limited to 'tests')
-rw-r--r--tests/suite/syntax/comment.typ35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/suite/syntax/comment.typ b/tests/suite/syntax/comment.typ
index 5e7e0ee6..88802fe9 100644
--- a/tests/suite/syntax/comment.typ
+++ b/tests/suite/syntax/comment.typ
@@ -34,6 +34,41 @@ Second part
First part //
Second part
+--- issue-4632-sth-followed-by-comment ---
+// Test heading markers followed by comments.
+#test([
+ =// Comment
+ =/* Comment */
+], [
+ =
+ =
+])
+
+// Test list markers followed by comments.
+#test([
+ -// Comment
+ -/* Comment */
+], [
+ -
+ -
+])
+
+// Test enum markers followed by comments.
+#test([
+ +// Comment
+ +/* Comment */
+
+ 1.// Comment
+ 2./* Comment */
+], [
+ +
+ +
+
+ 1.
+ 2.
+])
+
+
--- comment-block-unclosed ---
// End should not appear without start.
// Error: 7-9 unexpected end of block comment