mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-16 01:55:46 +01:00
util.regexp.iterate
--HG-- extra : rebase_source : 2c9d5a20ceb0a3ffde32ad8989ce6f594df8c406
This commit is contained in:
@@ -161,9 +161,7 @@ var Template = Module("Template", {
|
||||
|
||||
highlightRegexp: function highlightRegexp(str, re, highlight) {
|
||||
return this.highlightSubstrings(str, (function () {
|
||||
re.lastIndex = 0;
|
||||
let res;
|
||||
while ((res = re.exec(str)) && res[0].length)
|
||||
for (let res in util.regexp.iterate(re, str))
|
||||
yield [res.index, res[0].length, res.wholeMatch ? [res] : res];
|
||||
})(), highlight || template.filter);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user