diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-13 17:15:11 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-13 17:15:20 +0100 |
| commit | 28b5c55cd5ef59713239c73d03fa0051623513d3 (patch) | |
| tree | 6e5b1eeba088120ee77237f8086af5f4a34fbc49 /tests/typ | |
| parent | 05c8c6045cd831a98776b418a7b176af8c6ec546 (diff) | |
Configurable markers for nested lists
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/layout/list-marker.typ | 34 | ||||
| -rw-r--r-- | tests/typ/layout/list.typ | 5 |
2 files changed, 34 insertions, 5 deletions
diff --git a/tests/typ/layout/list-marker.typ b/tests/typ/layout/list-marker.typ new file mode 100644 index 00000000..0d223b58 --- /dev/null +++ b/tests/typ/layout/list-marker.typ @@ -0,0 +1,34 @@ +// Test list marker configuraiton. + +--- +// Test en-dash. +#set list(marker: [--]) +- A +- B + +--- +// Test that last item is repeated. +#set list(marker: ([--], [•])) +- A + - B + - C + +--- +// Test function. +#set list(marker: n => if n == 1 [--] else [•]) +- A +- B + - C + - D + - E +- F + +--- +// Test that bare hyphen doesn't lead to cycles and crashes. +#set list(marker: [-]) +- Bare hyphen is +- a bad marker + +--- +// Error: 19-21 must contain at least one marker +#set list(marker: ()) diff --git a/tests/typ/layout/list.typ b/tests/typ/layout/list.typ index 3fd9ddb1..71ccfe35 100644 --- a/tests/typ/layout/list.typ +++ b/tests/typ/layout/list.typ @@ -45,11 +45,6 @@ _Shopping list_ - B with 2 tabs --- -#set list(marker: [-]) -- Bare hyphen -- is not a list - ---- // Edge cases. - Not in list |
