summaryrefslogtreecommitdiff
path: root/tests/typ/markup/heading.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-09 00:37:13 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-09 00:37:13 +0200
commit5afb42ad89abb518a01a09051f0f9b6f75bd383e (patch)
treeb12368a287f22de711df8d759c20ee742ed5b4c2 /tests/typ/markup/heading.typ
parentd69dfa84ec957ac4037f60a3335416a9f73b97c8 (diff)
Lists with indent-based parsing
- Unordered lists with indent-based parsing and basic layout using stacks - Headings are now also indent based - Removes syntax functions since they will be superseded by select & transform
Diffstat (limited to 'tests/typ/markup/heading.typ')
-rw-r--r--tests/typ/markup/heading.typ48
1 files changed, 19 insertions, 29 deletions
diff --git a/tests/typ/markup/heading.typ b/tests/typ/markup/heading.typ
index 56f48bae..cffa6ed4 100644
--- a/tests/typ/markup/heading.typ
+++ b/tests/typ/markup/heading.typ
@@ -4,38 +4,21 @@
// Different number of hashtags.
// Valid levels.
-# 1
-### 2
-###### 6
+# Level 1
+### Level 2
+###### Level 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.
-# #rect[
- A
-] B
-
-// Without some kind of block, headings end at a line break.
-# A
-B
+####### Level 7
---
// Heading vs. no heading.
// Parsed as headings if at start of the context.
-/**/ # Ok
-{[## Ok]}
-#rect[### Ok]
+/**/ # Level 1
+{[## Level 2]}
+#rect[### Level 3]
// Not at the start of the context.
No # heading
@@ -44,9 +27,16 @@ No # heading
\# No heading
---
-// Make small, but double heading.
-#let heading(contents) = heading(contents + contents, level: 6)
+// While indented at least as much as the start, the heading continues.
+
+# This
+ is
+ indented.
+
+# This
+ is not.
-// The new heading's argument list doesn't contain `level`.
-// Error: 1-11 unexpected argument
-### Twice.
+// Code blocks continue heading.
+# A {
+ "B"
+}