Skip to content

Tests/rewrite array matches#1444

Open
zorkow wants to merge 3 commits intotests/rewrite_remaining_xmlmatchesfrom
tests/rewrite_array_matches
Open

Tests/rewrite array matches#1444
zorkow wants to merge 3 commits intotests/rewrite_remaining_xmlmatchesfrom
tests/rewrite_array_matches

Conversation

@zorkow
Copy link
Member

@zorkow zorkow commented Mar 13, 2026

This PR removes all occurrences of toXmlArrayMatch from the Tag and Tex tests.

This now allows us to get rid of all helper functions related to XML matching, which was done via conversion to JSON. This has the advantage that

  1. we can get rid of the dependency of the xml-js library,
  2. tests run faster as we skip the xml2json conversion entirely.

This completes the refactoring of the tests to use snapshots instead of customised XML comparison.

@zorkow zorkow requested a review from dpvc March 13, 2026 10:02
Copy link
Member

@dpvc dpvc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Slight reformatting might be nice, but not crucial.

Comment on lines +607 to +608
await page2mml('<p>$$a=b\\label{eq1}\\tag{1}$$</p><p>Refer to \\eqref{eq1}</p>')).
toMatchSnapshot();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the ). from the end of line 607 shouldn't be moved to the beginning of 608.

Similarly for the others. Some I think can be put on a single line, like 177+178.

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.

2 participants