From ea145ff33bb6c3babb9765b5d0059612b2ea54f0 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 16 Sep 2024 18:17:24 +0200 Subject: Do not surface warnings from non-last layout iterations (#4970) --- tests/suite/foundations/context.typ | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/suite/foundations/context.typ b/tests/suite/foundations/context.typ index 0906fb1e..9ed31757 100644 --- a/tests/suite/foundations/context.typ +++ b/tests/suite/foundations/context.typ @@ -76,3 +76,16 @@ // Warning: 2-44 `counter.display` without context is deprecated // Hint: 2-44 use it in a `context` expression instead #counter(heading).display(n => test(n, 10)) + +--- context-delayed-warning --- +// Ensure that the warning that triggers in the first layout iteration is not +// surfaced since it goes away in the second one. Just like errors in show +// rules. +#show heading: none + += A +#context { + let n = query().len() + let fonts = ("nope", "Roboto") + set text(font: fonts.at(n)) +} -- cgit v1.2.3