summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-08 10:54:04 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-08 11:02:27 +0100
commite5eab73374880077971f3f22acbdd3d302877128 (patch)
tree07aa926b27032d6bcd82486d664dfd4161ccbd3e /tests/typ
parent1b2b53ecb91a9bd7fb3493e471ae03cd142a7c03 (diff)
Streamline field names
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/compiler/field.typ2
-rw-r--r--tests/typ/compiler/show-node.typ8
-rw-r--r--tests/typ/layout/terms.typ2
-rw-r--r--tests/typ/meta/heading.typ2
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/typ/compiler/field.typ b/tests/typ/compiler/field.typ
index 1d7d0b7a..27b31f7d 100644
--- a/tests/typ/compiler/field.typ
+++ b/tests/typ/compiler/field.typ
@@ -15,7 +15,7 @@
---
// Test field on node.
#show list: node => {
- test(node.items.len(), 3)
+ test(node.children.len(), 3)
}
- A
diff --git a/tests/typ/compiler/show-node.typ b/tests/typ/compiler/show-node.typ
index 6416043c..f87b1971 100644
--- a/tests/typ/compiler/show-node.typ
+++ b/tests/typ/compiler/show-node.typ
@@ -2,7 +2,7 @@
---
// Override lists.
-#show list: it => "(" + it.items.map(item => item.body).join(", ") + ")"
+#show list: it => "(" + it.children.map(v => v.body).join(", ") + ")"
- A
- B
@@ -31,9 +31,9 @@ my heading?
box(move(dy: -1pt)[📖])
h(5pt)
if it.level == 1 {
- underline(text(1.25em, blue, it.title))
+ underline(text(1.25em, blue, it.body))
} else {
- text(red, it.title)
+ text(red, it.body)
}
})
@@ -51,7 +51,7 @@ Another text.
#show heading: it => {
set text(red)
show "ding": [🛎]
- it.title
+ it.body
}
= Heading
diff --git a/tests/typ/layout/terms.typ b/tests/typ/layout/terms.typ
index 0be8ddc7..fa94ae12 100644
--- a/tests/typ/layout/terms.typ
+++ b/tests/typ/layout/terms.typ
@@ -35,7 +35,7 @@
#show terms: it => table(
columns: 2,
inset: 3pt,
- ..it.items.map(item => (emph(item.term), item.description)).flatten(),
+ ..it.children.map(v => (emph(v.term), v.description)).flatten(),
)
/ A: One letter
diff --git a/tests/typ/meta/heading.typ b/tests/typ/meta/heading.typ
index 992c0bb4..7db2a5cf 100644
--- a/tests/typ/meta/heading.typ
+++ b/tests/typ/meta/heading.typ
@@ -38,7 +38,7 @@ multiline.
---
// Test styling.
#show heading.where(level: 5): it => block(
- text(font: "Roboto", fill: eastern, it.title + [!])
+ text(font: "Roboto", fill: eastern, it.body + [!])
)
= Heading