Repository navigation
feat: pattern= couldn't use \p{...}, and :blank and :defined never matched - #90
Merged
Merged
Conversation
…tched Syncs Netweir 8c6f3bc, which brings two changes: - netweir/netweir#327: Unicode property escapes in the pattern engine, with Unicode 17.0 tables generated by scripts/gen-unicode.py: every General_Category, Script and Script_Extensions value and the binary properties ECMAScript lists. A name field with pattern="\p{L}+" is :invalid now when it should be. - netweir/netweir#328, by foothillsdigital: :blank as the current Selectors draft defines it, and :defined for custom element names. NOTICE credits the Unicode Character Database.
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
:valid/:invalidcheckedpattern=with Parsec's own regex engine, but\p{...}and\P{...}didn't compile, so a pattern using them counted as no pattern and the input was never:invalid(pattern can't use \p{...}, so those inputs are never :invalid #72).:blankand:definedwere parsed and never matched (Match :blank and :defined #13).Change
Syncs Netweir 8c6f3bc:
crates/parsec/scripts/gen-unicode.pygenerates and commits (180 KB, no new dependency). Properties of strings like\p{RGI_Emoji}still don't compile; the code says so.:blankwith the current Selectors draft's meaning, and:definedfollowing the DOM's "create an element".Also: NOTICE credits the Unicode Character Database, and README and ROADMAP mark both done.
Closes #72
Closes #13
Tests
cargo test --workspace: 156 test groups, 0 failed. html5lib tokenizer 7,045 and tree construction 3,898 passed, 0 failed.:blank/:definedcases.