From 8207c31aec6336b773fbf4661fdb87625c8b584e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 10 Aug 2021 11:28:12 +0200 Subject: 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 --- tests/ref/markup/lists.png | Bin 14750 -> 15207 bytes tests/typ/markup/enums.typ | 2 +- tests/typ/markup/heading.typ | 2 +- tests/typ/markup/lists.typ | 32 ++++++++++++++++++-------------- 4 files changed, 20 insertions(+), 16 deletions(-) (limited to 'tests') diff --git a/tests/ref/markup/lists.png b/tests/ref/markup/lists.png index 815e5105..315905b8 100644 Binary files a/tests/ref/markup/lists.png and b/tests/ref/markup/lists.png differ 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 @@ -6,6 +6,12 @@ _Shopping list_ - Potatoes - 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 -- cgit v1.2.3