-
Notifications
You must be signed in to change notification settings - Fork 327
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
Fix matchpattern file:
match
#2782
Fix matchpattern file:
match
#2782
Conversation
TYPO: protcol |
13f83a4
to
d8ea161
Compare
Never happened. =-) |
= (pattern, urlStr) => assert.isNotOk(pattern.doMatch(new URL(urlStr))); | ||
describe('invalid patterns', () => { | ||
const newPattern = | ||
pattern => { return () => new MatchPattern(pattern) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this fits on one line, but for all statements continued across >1 line, continuations should be indented 4 spaces.
8a5e855
to
1370ac0
Compare
Parsing of the pattern in regard to `file:` and hostname or lack thereofore have been changed to more properly reflect Google specification. https://developer.chrome.com/extensions/match_patterns
1370ac0
to
aa8d6d1
Compare
This is valuable, but only after #2693 . |
if only #2693 is done you can still use If you only do this, you get nothing. But yes, the two are closely related. |
I don't recall how I stumbled upon this, but I found out that
MatchPattern.js
doesn't quite follow Google's specification.file:///foo*
is a valid match pattern but the previous code would not allow it. A fix to the Regex solved that problem.Also added a bunch of tests.