mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Timings for state.at
and state.get
(#5411)
This commit is contained in:
parent
cce744cf78
commit
5db179d67a
@ -280,6 +280,7 @@ impl State {
|
|||||||
/// Retrieves the value of the state at the current location.
|
/// Retrieves the value of the state at the current location.
|
||||||
///
|
///
|
||||||
/// This is equivalent to `{state.at(here())}`.
|
/// This is equivalent to `{state.at(here())}`.
|
||||||
|
#[typst_macros::time(name = "state.get", span = span)]
|
||||||
#[func(contextual)]
|
#[func(contextual)]
|
||||||
pub fn get(
|
pub fn get(
|
||||||
&self,
|
&self,
|
||||||
@ -303,6 +304,7 @@ impl State {
|
|||||||
/// _Compatibility:_ For compatibility with Typst 0.10 and lower, this
|
/// _Compatibility:_ For compatibility with Typst 0.10 and lower, this
|
||||||
/// function also works without a known context if the `selector` is a
|
/// function also works without a known context if the `selector` is a
|
||||||
/// location. This behaviour will be removed in a future release.
|
/// location. This behaviour will be removed in a future release.
|
||||||
|
#[typst_macros::time(name = "state.at", span = span)]
|
||||||
#[func(contextual)]
|
#[func(contextual)]
|
||||||
pub fn at(
|
pub fn at(
|
||||||
&self,
|
&self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user