Skip to content

Respect set rules in where selectors - #3290

Merged
laurmaedje merged 5 commits into
mainfrom
where-set-rules
Jan 30, 2024
Merged

laurmaedje merged 5 commits into
mainfrom
where-set-rules

Conversation

@laurmaedje

@laurmaedje laurmaedje commented Jan 29, 2024 •

Copy link
Copy Markdown
Member

Fixes #1024.

Currently, this takes into account #[resolve], which I'm not sure about. It means that adding/removing #[resolve] is technically a breaking change. I also plan to auto-synthesize all fields before running a show rule and the behaviour there would be equivalent. For examples of the resolve behaviour see the later tests.

@Dherse

Dherse commented Jan 29, 2024

Copy link
Copy Markdown
Contributor

That's a surprisingly short change 🤔

@laurmaedje laurmaedje mentioned this pull request Jan 29, 2024
@laurmaedje

Copy link
Copy Markdown
Member Author

I've opened #3294 to decouple folding and resolving, so that we can include folding in the selector matching but exclude resolving to keep things predictable and be guarded against breaking changes due to #[resolve].

@laurmaedje

Copy link
Copy Markdown
Member Author

With #3294 and #3303 merged, I was able to exclude #[resolve] from the field access, but keep #[fold] in, which is nice!

@laurmaedje
laurmaedje added this pull request to the merge queue Jan 30, 2024
Merged via the queue into main with commit b744b87 Jan 30, 2024
@laurmaedje
laurmaedje deleted the where-set-rules branch February 1, 2024 13:33
Dherse pushed a commit to Dherse/typst that referenced this pull request Feb 4, 2024
Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selectors only work on inherent fields, not on set rule or default fields

2 participants