summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-27 11:43:02 +0100
committerGitHub <noreply@github.com>2024-02-27 10:43:02 +0000
commit9646a132a80d11b37649b82c419833003ac7f455 (patch)
tree82324da4b63921be724969998c0249eca20cff34 /tests/typ
parent145723b1ef4fa23f1f6665b8907dfe79d0bf83cf (diff)
Fix parser bug with space before colon (#3504)
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/bugs/3502-colon-space.typ14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/typ/bugs/3502-colon-space.typ b/tests/typ/bugs/3502-colon-space.typ
new file mode 100644
index 00000000..35f38a9b
--- /dev/null
+++ b/tests/typ/bugs/3502-colon-space.typ
@@ -0,0 +1,14 @@
+// Test that a space after a named parameter is permissible.
+// https://github.com/typst/typst/issues/3502
+// Ref: false
+
+---
+#let f( param : v ) = param
+#test(f( param /* ok */ : 2 ), 2)
+
+---
+#let ( key : /* hi */ binding ) = ( key: "ok" )
+#test(binding, "ok")
+
+---
+#test(( key : "value" ).key, "value")