summaryrefslogtreecommitdiff
path: root/tests/typ/markup/heading.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/markup/heading.typ')
-rw-r--r--tests/typ/markup/heading.typ44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/typ/markup/heading.typ b/tests/typ/markup/heading.typ
new file mode 100644
index 00000000..8497ec8f
--- /dev/null
+++ b/tests/typ/markup/heading.typ
@@ -0,0 +1,44 @@
+// Test headings.
+
+---
+// Different number of hashtags.
+
+// Valid levels.
+=1
+===2
+======6
+
+// Too many hashtags.
+// Warning: 1-8 should not exceed depth 6
+=======7
+
+---
+// Heading continuation over linebreak.
+
+// Code blocks continue heading.
+= A{
+ "B"
+}
+
+// Function call continues heading.
+= #box[
+ A
+] B
+
+// Without some kind of block, headings end at a line break.
+= A
+B
+
+---
+// Heading vs. no heading.
+
+// Parsed as headings if at start of the context.
+/**/ = Ok
+{[== Ok]}
+#box[=== Ok]
+
+// Not at the start of the context.
+No = heading
+
+// Escaped.
+\= No heading