diff --git a/goon/browserassets/js/browserOutput.js b/goon/browserassets/js/browserOutput.js index d20d2eb239e..20162e8d3ca 100644 --- a/goon/browserassets/js/browserOutput.js +++ b/goon/browserassets/js/browserOutput.js @@ -183,11 +183,11 @@ function highlightTerms(el) { if (regexHasError) return; //just stop right there ig the regex is gonna except - function highlightRecursor(element,term){ //recursor function to do the highlighting proper - var regex = new RegExp(term,"gi"); + function highlightRecursor(element, term){ //recursor function to do the highlighting proper + var regex = new RegExp(term, "gi"); function replace(str) { - return str.replace(regex,'$&'); + return str.replace(regex, '$&'); } var s = ''; @@ -198,7 +198,7 @@ function highlightTerms(el) { var next_term = work.substring(ind).search(regex); if(next_term != -1) next_term += ind; - var next_tag = work.indexOf('<',ind); + var next_tag = work.indexOf('<', ind); if(next_tag == -1) { s+=replace(work.substring(ind)); break; @@ -208,12 +208,12 @@ function highlightTerms(el) { break; } else if(next_tag < next_term) { - var temp = work.indexOf('>',next_tag); + var temp = work.indexOf('>', next_tag); s += work.substring(ind,temp+1); ind = temp+1; } else { - s += replace(work.substring(ind,next_tag)); + s += replace(work.substring(ind, next_tag)); ind = next_tag; } } @@ -231,9 +231,9 @@ function highlightTerms(el) { } else { try{ - new RegExp(opts.highlightTerms[i],"gmi"); // check to make sure the pattern wont cause issues + new RegExp(opts.highlightTerms[i], "gmi"); // check to make sure the pattern wont cause issues } catch(e){ - el.innerHTML += '
Your highlight regex pattern - '+opts.highlightTerms[i]+' - is malformed.
Your highlights have been disabled until they are next edited
Thrown exception: '+e+'
'; + el.innerHTML += '
Your highlight regex pattern -- ' + opts.highlightTerms[i] + ' -- is malformed.
Your highlights have been disabled until they are next edited
Thrown exception: '+e+'
'; regexHasError = true; return; }