Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structural diffing of Typst values #25

Open
tingerrr opened this issue Jun 26, 2024 · 1 comment
Open

Structural diffing of Typst values #25

tingerrr opened this issue Jun 26, 2024 · 1 comment
Labels
A-lib Area: library crate A-test-lib Area: typst test library C-feature Category: feature request P-low Priority: low

Comments

@tingerrr
Copy link
Owner

Add functions which do structural diffing on their input values, showing only the mismatched portion.

#assert-strural-eq(
  (a: 1, b: 2, c: 3),
  (a: 1, b: 3, d: 3),
)

Which would only highlight the value difference in b and the key difference in c/d. See #23 (comment).

In some sense, this is already kind of possible by using the valkyrie package and creating schema on the fly from one of the values, but this is biased towards one value.

cc: @Jamesxx you may be interested in this.

@tingerrr tingerrr added C-feature Category: feature request blocked This is blocked by another issue or PR A-lib Area: library crate P-low Priority: low A-test-lib Area: typst test library labels Jun 26, 2024
@jamesrswift
Copy link

Beautiful, I'm gonna see about updating the tests

@tingerrr tingerrr removed the blocked This is blocked by another issue or PR label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lib Area: library crate A-test-lib Area: typst test library C-feature Category: feature request P-low Priority: low
Projects
None yet
Development

No branches or pull requests

2 participants