summaryrefslogtreecommitdiff
path: root/tests/typ/meta
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-13 16:50:57 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-13 16:50:57 +0100
commit8f68bc7a8ea619af12d95bec7025bd9f3a86625f (patch)
tree7f9b454ed419b45d7787de4ace992b40078d4072 /tests/typ/meta
parentb1b4e52af9e2da8f8ae1fc17a81ed6cbcbb8f525 (diff)
Dissolve basics folder
Diffstat (limited to 'tests/typ/meta')
-rw-r--r--tests/typ/meta/heading.typ53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/typ/meta/heading.typ b/tests/typ/meta/heading.typ
new file mode 100644
index 00000000..3d637036
--- /dev/null
+++ b/tests/typ/meta/heading.typ
@@ -0,0 +1,53 @@
+// Test headings.
+
+---
+// Different number of equals signs.
+
+= Level 1
+== Level 2
+=== Level 3
+
+// After three, it stops shrinking.
+=========== Level 11
+
+---
+// Heading vs. no heading.
+
+// Parsed as headings if at start of the context.
+/**/ = Level 1
+#{[== Level 2]}
+#box[=== Level 3]
+
+// Not at the start of the context.
+No = heading
+
+// Escaped.
+\= No heading
+
+---
+// Blocks can continue the heading.
+
+= #[This
+is
+multiline.
+]
+
+= This
+ is not.
+
+---
+// Test styling.
+#show heading.where(level: 5): it => block(
+ text(family: "Roboto", fill: eastern, it.title + [!])
+)
+
+= Heading
+===== Heading 🌍
+#heading(level: 5)[Heading]
+
+---
+// Edge cases.
+#set heading(numbering: "1.")
+=
+Not in heading
+=Nope