summaryrefslogtreecommitdiff
path: root/tests/typ/markup
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-10 11:28:12 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-10 11:28:12 +0200
commit8207c31aec6336b773fbf4661fdb87625c8b584e (patch)
treec1642033478081bec6c3eed693e92a469f0500e1 /tests/typ/markup
parent3932bb2cb93be95d67fc56998423eb9ce047fdfa (diff)
Minor refactorings
- Reorder parser methods and use `Pos` everywhere - Remove tab special handling for columns and adapt heading/list/enum indent handling - Don't panic when a file has an empty path
Diffstat (limited to 'tests/typ/markup')
-rw-r--r--tests/typ/markup/enums.typ2
-rw-r--r--tests/typ/markup/heading.typ2
-rw-r--r--tests/typ/markup/lists.typ32
3 files changed, 20 insertions, 16 deletions
diff --git a/tests/typ/markup/enums.typ b/tests/typ/markup/enums.typ
index 516fd0c1..ecf08a36 100644
--- a/tests/typ/markup/enums.typ
+++ b/tests/typ/markup/enums.typ
@@ -8,4 +8,4 @@
---
1. First.
2. Second.
- 1. Back to first.
+1. Back to first.
diff --git a/tests/typ/markup/heading.typ b/tests/typ/markup/heading.typ
index bc0317b3..4647e7a6 100644
--- a/tests/typ/markup/heading.typ
+++ b/tests/typ/markup/heading.typ
@@ -33,7 +33,7 @@ No = heading
indented.
= This
- is not.
+is not.
// Code blocks continue heading.
= A {
diff --git a/tests/typ/markup/lists.typ b/tests/typ/markup/lists.typ
index 5c464ab8..716fcd73 100644
--- a/tests/typ/markup/lists.typ
+++ b/tests/typ/markup/lists.typ
@@ -7,6 +7,12 @@ _Shopping list_
- Juice
---
+Tightly
+- surrounded
+- by two
+paragraphs.
+
+---
- First level.
- Second level.
@@ -18,28 +24,26 @@ _Shopping list_
- At the top.
---
-- Works
- - Also with four spaces
- - Or two tabs
+- Level 1
+ - Level [
+2 through template
+]
---
- Top-level indent
- is fine.
---
-Tightly
-- surrounded
-- by two
-paragraphs.
-
----
- A
- B
- C
- - D
+- D
---
-- Level 1
- - Level [
-2 through template
-]
+// This works because tabs are used consistently.
+ - A with 1 tab
+ - B with 2 tabs
+
+// This doesn't work because of mixed tabs and spaces.
+ - A with 2 spaces
+ - B with 2 tabs