From 211b546e4e4c75caaa6ee31493d52802b898aa2a Mon Sep 17 00:00:00 2001 From: Johann Birnick <6528009+jbirnick@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:02:04 +0200 Subject: Fixes counter stepping behavior (#4631) Co-authored-by: Laurenz --- tests/ref/outline.png | Bin 40846 -> 40642 bytes tests/suite/introspection/counter.typ | 12 ++++++++++++ 2 files changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/ref/outline.png b/tests/ref/outline.png index 71dd6e1a..c0d22969 100644 Binary files a/tests/ref/outline.png and b/tests/ref/outline.png differ diff --git a/tests/suite/introspection/counter.typ b/tests/suite/introspection/counter.typ index be17d7e0..0d2be6e2 100644 --- a/tests/suite/introspection/counter.typ +++ b/tests/suite/introspection/counter.typ @@ -104,3 +104,15 @@ At Beta, it was #context { #block(foo()) #block(foo()) #foo() + +--- issue-4626-counter-depth-skip --- +// When we step and skip a level, the levels should be filled with zeros, not +// with ones. +#let c = counter("c") +#context test(c.get(), (0,)) +#c.step(level: 4) +#context test(c.get(), (0, 0, 0, 1)) +#c.step(level: 1) +#context test(c.get(), (1,)) +#c.step(level: 3) +#context test(c.get(), (1, 0, 1)) -- cgit v1.2.3