diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-14 13:23:40 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-14 13:24:48 +0200 |
| commit | 2db4b603db7684db7105d7ed627883b5cef6d497 (patch) | |
| tree | 26a884a2c291bccbc86c5aba75351b40d8499835 | |
| parent | b274155c6d36dfe956899e3606b535cc94c8aca9 (diff) | |
Fix bug with enums starting at zero
| -rw-r--r-- | src/library/structure/list.rs | 2 | ||||
| -rw-r--r-- | tests/typ/structure/enum.typ | 4 | ||||
| -rw-r--r-- | tests/typ/structure/list.typ | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/library/structure/list.rs b/src/library/structure/list.rs index 02a7cd38..9d5d3a7d 100644 --- a/src/library/structure/list.rs +++ b/src/library/structure/list.rs @@ -53,7 +53,7 @@ impl<const L: ListKind> ListNode<L> { fn construct(_: &mut Context, args: &mut Args) -> TypResult<Content> { Ok(Content::show(Self { - start: args.named("start")?.unwrap_or(0), + start: args.named("start")?.unwrap_or(1), wide: args.named("wide")?.unwrap_or(false), items: args .all()? diff --git a/tests/typ/structure/enum.typ b/tests/typ/structure/enum.typ index 31eb0d62..c4d178ce 100644 --- a/tests/typ/structure/enum.typ +++ b/tests/typ/structure/enum.typ @@ -1,9 +1,7 @@ // Test enums. --- -. Embrace -. Extend -. Extinguish +#enum[Embrace][Extend][Extinguish] --- 1. First. diff --git a/tests/typ/structure/list.typ b/tests/typ/structure/list.typ index a01a90dd..52cd51be 100644 --- a/tests/typ/structure/list.typ +++ b/tests/typ/structure/list.typ @@ -2,9 +2,7 @@ --- _Shopping list_ -- Apples -- Potatoes -- Juice +#list[Apples][Potatoes][Juice] --- Tightly |
