From e5470401f4861a6aa57a2a4dfd6ce0402de71e1d Mon Sep 17 00:00:00 2001 From: frozolotl <44589151+frozolotl@users.noreply.github.com> Date: Fri, 24 Nov 2023 05:41:38 -0500 Subject: Fix `has` on non-inherent fields (#2745) --- tests/ref/compiler/content-field.png | Bin 2423 -> 24704 bytes tests/typ/compiler/content-field.typ | 14 ++++++++++++++ 2 files changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/ref/compiler/content-field.png b/tests/ref/compiler/content-field.png index cef3274a..093d9046 100644 Binary files a/tests/ref/compiler/content-field.png and b/tests/ref/compiler/content-field.png differ diff --git a/tests/typ/compiler/content-field.typ b/tests/typ/compiler/content-field.typ index 1d3dceb7..f8adfc42 100644 --- a/tests/typ/compiler/content-field.typ +++ b/tests/typ/compiler/content-field.typ @@ -1,3 +1,17 @@ +// Tests for field introspection. + +--- +// Verify that non-inherent fields are hidden if not set. +#show figure: it => [ + `repr(it)`: #repr(it) \ + `it.has("gap"): `#repr(it.has("gap")) \ +] + +#figure[] + +#figure([], gap: 1pt) + +--- // Integrated test for content fields. #let compute(equation, ..vars) = { -- cgit v1.2.3