diff --git a/crates/typst/src/introspection/counter.rs b/crates/typst/src/introspection/counter.rs index 3bf553a51..c3ed2bc7c 100644 --- a/crates/typst/src/introspection/counter.rs +++ b/crates/typst/src/introspection/counter.rs @@ -213,7 +213,7 @@ impl Counter { /// The counter for the given element. pub fn of(func: Element) -> Self { - Self::construct(CounterKey::Selector(Selector::Elem(func, None))) + Self::new(CounterKey::Selector(Selector::Elem(func, None))) } /// Gets the current and final value of the state combined in one state. @@ -405,14 +405,14 @@ impl Counter { /// /// - If it is a string, creates a custom counter that is only affected /// by manual updates, - /// - If this is a `{