Fix lint errors

This commit is contained in:
Chris van Marle 2018-10-11 15:52:58 +02:00
parent dce542a8a9
commit e086952d09

View file

@ -227,7 +227,7 @@ function regexList (input, regex, displayTotal, matches, captureGroups) {
*/ */
function regexHighlight (input, regex, displayTotal) { function regexHighlight (input, regex, displayTotal) {
let output = "", let output = "",
title = "", title = "",
m, m,
hl = 1, hl = 1,
i = 0, i = 0,
@ -242,13 +242,13 @@ function regexHighlight (input, regex, displayTotal) {
// Add up to match // Add up to match
output += Utils.escapeHtml(input.slice(i, m.index)); output += Utils.escapeHtml(input.slice(i, m.index));
title = "Offset: " + m.index + "
"; title = "Offset: " + m.index + "
";
if (m.length > 1) { if (m.length > 1) {
title += "Groups:
"; title += "Groups:
";
for ( let n = 1; n < m.length; ++n) { for (let n = 1; n < m.length; ++n) {
title += n + ": " + m[n] + "&#10;"; title += n + ": " + m[n] + "&#10;";
} }
} }
// Add match with highlighting // Add match with highlighting
output += "<span class='hl"+hl+"' title='"+title+"'>" + Utils.escapeHtml(m[0]) + "</span>"; output += "<span class='hl"+hl+"' title='"+title+"'>" + Utils.escapeHtml(m[0]) + "</span>";