From 2db4b603db7684db7105d7ed627883b5cef6d497 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 14 Apr 2022 13:23:40 +0200 Subject: [PATCH] Fix bug with enums starting at zero --- src/library/structure/list.rs | 2 +- tests/typ/structure/enum.typ | 4 +--- 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 02a7cd383..9d5d3a7d5 100644 --- a/src/library/structure/list.rs +++ b/src/library/structure/list.rs @@ -53,7 +53,7 @@ impl ListNode { fn construct(_: &mut Context, args: &mut Args) -> TypResult { 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 31eb0d62b..c4d178ce5 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 a01a90dde..52cd51beb 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