summaryrefslogtreecommitdiff
path: root/tests/typ/elements/heading.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-28 15:50:48 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-28 23:54:34 +0100
commit3ca5b238238e1128aa7bbfbd5db9e632045d8600 (patch)
tree2471f4b340a15695b7f4d518c0b39fabaea676c4 /tests/typ/elements/heading.typ
parentb63c21c91d99a1554a019dc275f955d3e6a34271 (diff)
Reorganize library
Diffstat (limited to 'tests/typ/elements/heading.typ')
-rw-r--r--tests/typ/elements/heading.typ50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/typ/elements/heading.typ b/tests/typ/elements/heading.typ
new file mode 100644
index 00000000..2ae97aa8
--- /dev/null
+++ b/tests/typ/elements/heading.typ
@@ -0,0 +1,50 @@
+// Test headings.
+
+---
+// Different number of hashtags.
+
+// Valid levels.
+= Level 1
+=== Level 2
+====== Level 6
+
+// At some point, it should stop 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
+
+---
+// While indented at least as much as the start, the heading continues.
+
+= This
+ is
+ indented.
+
+= This
+is not.
+
+// Code blocks continue heading.
+= A {
+ "B"
+}
+
+---
+// Test styling.
+= Heading
+
+#set heading(family: "Roboto", fill: eastern)
+
+===== Heading 🌍
+#heading(level: 5)[Heading]