summaryrefslogtreecommitdiff
path: root/tests/typ/markup/heading.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-02-20 17:53:40 +0100
committerLaurenz <laurmaedje@gmail.com>2021-02-20 23:34:33 +0100
commit05727bfc3a9cfd45a8e2028dfd0806f7a8f88015 (patch)
tree6c0b66eb2a9dff224cb39eb6ccb478656a706c04 /tests/typ/markup/heading.typ
parent927341d93ae29678095e3b874bd68bfc57d4bc05 (diff)
Reorganize tests 🔀
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