summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/show-text.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-05 10:42:14 +0100
committerGitHub <noreply@github.com>2024-02-05 09:42:14 +0000
commit92aba81a91364eb49f3a613cd2db3b2163202434 (patch)
tree28e471e3d882b480b190c3024f21548de73683d7 /tests/typ/compiler/show-text.typ
parentb224769c85767bccc8f21ab5ecaa01d93a5ea149 (diff)
Support text show rules that match their own output (#3327)
Diffstat (limited to 'tests/typ/compiler/show-text.typ')
-rw-r--r--tests/typ/compiler/show-text.typ21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/typ/compiler/show-text.typ b/tests/typ/compiler/show-text.typ
index c279507b..7837bb46 100644
--- a/tests/typ/compiler/show-text.typ
+++ b/tests/typ/compiler/show-text.typ
@@ -14,6 +14,27 @@ Die Zeitung Der Spiegel existiert.
TeX, LaTeX, LuaTeX and LuaLaTeX!
---
+// Test direct cycle.
+#show "Hello": text(red)[Hello]
+Hello World!
+
+---
+// Test replacing text with raw text.
+#show "rax": `rax`
+The register rax.
+
+---
+// Test indirect cycle.
+#show "Good": [Typst!]
+#show "Typst": [Fun!]
+#show "Fun": [Good!]
+
+#set text(ligatures: false)
+Good \
+Fun \
+Typst \
+
+---
// Test that replacements happen exactly once.
#show "A": [BB]
#show "B": [CC]