We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afb3d4a commit 0f7eae0Copy full SHA for 0f7eae0
webextensions/background/uriMatcher.js
@@ -97,9 +97,10 @@ var URIMatcher = {
97
const positionKey = `${range.startTextNodePos}:${range.startOffset}`;
98
const longestResult = longestResultAt.get(positionKey);
99
if (longestResult) {
100
- if (longestResult.text.length > maybeURI.original.length)
101
- continue;
102
- results.delete(longestResult);
+ if (longestResult.text.length <= maybeURI.original.length &&
+ maybeURI.original.startsWith(longestResult.text)) {
+ results.delete(longestResult);
103
+ }
104
}
105
const result = {
106
text: maybeURI.original,
0 commit comments