From ad598f559e4284fabe45aff63b0eb7c5e5499b7d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 17 May 2024 12:59:31 +0200 Subject: Fix show rules on queried elements (#4166) --- tests/ref/issue-3726-query-show-set.png | Bin 0 -> 2295 bytes tests/suite/introspection/query.typ | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/ref/issue-3726-query-show-set.png (limited to 'tests') diff --git a/tests/ref/issue-3726-query-show-set.png b/tests/ref/issue-3726-query-show-set.png new file mode 100644 index 00000000..3f5c8884 Binary files /dev/null and b/tests/ref/issue-3726-query-show-set.png differ diff --git a/tests/suite/introspection/query.typ b/tests/suite/introspection/query.typ index 3a4b4fbf..6cdd4bab 100644 --- a/tests/suite/introspection/query.typ +++ b/tests/suite/introspection/query.typ @@ -265,3 +265,19 @@ )), ([Frog], [GiraffeCat], [Iguana]) ) + +--- issue-3726-query-show-set --- +// Test that show rules apply to queried elements, i.e. that the content +// returned from `query` isn't yet marked as prepared. +#set heading(numbering: "1.") +#show heading: underline += Hi + +#set heading(numbering: "I.") +#show heading: set text(blue) +#show heading: highlight.with(fill: aqua.lighten(50%)) += Bye + +// New show rules apply to this, but its location and the materialized fields +// from the original are retained. +#context query(heading).join() -- cgit v1.2.3