from shCore.js (added extra if check for typeof == object)
/**
* Applies all regular expression to the code and stores all found
* matches in the `this.matches` array.
* @param {Array} regexList List of regular
expressions.
* @param {String} code Source code.
* @return {Array} Returns list of
matches.
*/
findMatches: function(regexList, code) {
var result = [];
if (regexList != null) {
for (var i = 0; i < regexList.length; i++) {
// BUG: length returns len+1 for array if methods
added to prototype chain (oising@gmail.com)
if (typeof (regexList[i]) == "object") {
result = result.concat(sh.utils.getMatches(code,
regexList[i]));
}
}
}
// sort the matches
result = result.sort(sh.utils.matchesSortCallback);
return result;
},
Original issue reported on code.google.com by ois...@gmail.com on 4 Jun 2009 at 5:22
Original issue reported on code.google.com by
ois...@gmail.com
on 4 Jun 2009 at 5:22Attachments: