fixed quirks::parse_pattern of WPT [{ "pathname": "/(\\m)" }] #64
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.
URLPattern crate doesn't seem to test for
quirks::parse_pattern
but one of the failing tests when invoked from firefoxRelevant spec location: https://urlpattern.spec.whatwg.org/#compile-a-component
I'm not seeing the place in the algorithm where we should explicitly run the parser eval, but the spec notes the following:
"
The specification uses regular expressions to perform all matching, but this is not mandated. Implementations are free to perform matching directly against the part list when possible; e.g. when there are no custom regexp matching groups. If there are custom regular expressions, however, its important that they be immediately evaluated in the compile a component algorithm so an error can be thrown if they are invalid.
"
This is a bit of a hack and probably we should just be feeding Spidermonkey regex into the pattern, but it seems to fix the test without breaking anything else.