Greasemonkey: make *clude regexes case insensitive
Sometimes I don't read specs so good.
This commit is contained in:
parent
b2f95339ce
commit
971b413991
@ -201,7 +201,8 @@ class GreasemonkeyManager(QObject):
|
||||
# should be treated as a (ecma syntax) regular expression.
|
||||
string_url = url.toString(QUrl.FullyEncoded)
|
||||
if pattern.startswith('/') and pattern.endswith('/'):
|
||||
return re.search(pattern[1:-1], string_url) is not None
|
||||
matches = re.search(pattern[1:-1], string_url, flags=re.I)
|
||||
return matches is not None
|
||||
|
||||
# Otherwise they are glob expressions.
|
||||
return fnmatch.fnmatch(string_url, pattern)
|
||||
|
Loading…
Reference in New Issue
Block a user