Repository navigation
feat: Parsec was behind Netweir's parser by six changes - #70
Merged
Merged
Conversation
Sync crates/parsec from Netweir 7fac5f7: a maximum tree depth (#10), :dir() (#14), :target and :local-link given the page's URL (#16), append and insert_before refusing document and fragment nodes, a created SVG element's lower_name, and conformance counts written as JSON. CI now writes those counts on every test run, puts Linux's in the run summary and uploads them as the conformance artifact (#4).
jamesconwaydev
enabled auto-merge (squash)
November 15, 2026 23:23
This was referenced Nov 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Six of Netweir's parser changes hadn't reached Parsec, three of them roadmap items: a depth limit (#10),
:dir()(#14) and:target/:local-link(#16). And the conformance counts only existed in stderr and in prose on the wiki (#4).Change
scripts/sync-from-netweir.sh ../netweirat Netweir7fac5f7:Options::max_depth(feat(html): there was no way to cap how deep a parsed tree gets netweir/netweir#280): past the limit an element goes beside the current one, as Chromium'sAttachLaterdoes at 512.Noneby default, which changes nothing.:dir(ltr|rtl)(feat(css): :dir() wasn't supported netweir/netweir#282), fromdirattributes and, fordir="auto"and<bdi>, the first strong character. With:lang(), already here, that's all of Match :lang() and :dir() #14.:targetand:local-link(feat(css): :target and :local-link never matched, with no URL to go on netweir/netweir#286), throughMatchOptions { url }andselect_with/matches_with. Without a URL they match nothing, as before.appendandinsert_beforerefuse document and fragment nodes (fix(html): append and insert_before took a document or fragment node netweir/netweir#277); a created SVG element'slower_nameis lowercase (fix(html): a created SVG element's lower_name wasn't lowercase netweir/netweir#273).tests/summary/mod.rs(test(html): the conformance runners' counts only reached stderr netweir/netweir#320): withCONFORMANCE_DIRset, the tokenizer and tree-construction runners write<suite>.jsonwith passed, failed, skipped, why, and the test data's commit. It's added to the synced list.cargo testsetsCONFORMANCE_DIR; on Linux the counts go into the run summary as a table and up as theconformanceartifact, even when a suite fails.Tests
cargo test --workspace: all pass. The JSON written locally: tokenizer 7,042 passed, 0 failed, 4 skipped (html5lib-tests atc5495c5, after build(deps): bump crates/parsec/tests/html5lib-tests fromc777c40toc5495c5#66); tree construction 3,898 passed, 0 failed, 6 skipped.cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --all --check,scripts/check-headers.shandscripts/sync-from-netweir.sh --check ../netweirpass.Fixes #4
Fixes #10
Fixes #14
Fixes #16