diff --git a/src/layer/text.js b/src/layer/text.js index ba4e57135e4..0c8a8811473 100644 --- a/src/layer/text.js +++ b/src/layer/text.js @@ -103,8 +103,8 @@ var Text = function(parentEl) { this.highlightIndentGuides = true; this.setHighlightIndentGuides = function (highlight) { - if (this.displayIndentGuides == false) return false; - if (this.highlightIndentGuides == highlight) return false; + if (this.displayIndentGuides === false) return false; + if (this.highlightIndentGuides === highlight) return false; this.highlightIndentGuides = highlight; return highlight; @@ -449,7 +449,7 @@ var Text = function(parentEl) { if (bracketHighlight) { var ranges = this.session.$bracketHighlight.ranges; for (var i = 0; i < ranges.length; i++) { - if (cursor.row != ranges[i].start.row) { + if (cursor.row !== ranges[i].start.row) { this.$highlightIndentGuideMarker.end = ranges[i].start.row; if (cursor.row > ranges[i].start.row) { this.$highlightIndentGuideMarker.dir = -1; @@ -468,7 +468,7 @@ var Text = function(parentEl) { for (var i = cursor.row + 1; i < lines.length; i++) { var line = lines[i]; var currentIndent = /^\s*/.exec(line)[0].length; - if (line != '') { + if (line !== '') { this.$highlightIndentGuideMarker.end = i; if (currentIndent <= initialIndent) break; } @@ -486,7 +486,7 @@ var Text = function(parentEl) { var childNodes = cell.element.childNodes; if (childNodes.length > 0) { for (var j = 0; j < childNodes.length; j++) { - if (childNodes[j].className && childNodes[j].className.search("ace_indent-guide-active") != -1) { + if (childNodes[j].className && childNodes[j].className.search("ace_indent-guide-active") !== -1) { childNodes[j].className = childNodes[j].className.replace( "ace_indent-guide-active", "ace_indent-guide"); } @@ -497,7 +497,7 @@ var Text = function(parentEl) { this.$setIndentGuideActive = function (cell, indentLevel) { var line = this.session.doc.getLine(cell.row); - if (line != "") { + if (line !== "") { var childNodes = cell.element.childNodes; if (childNodes && childNodes[indentLevel - 1] && childNodes[indentLevel - 1].className) { childNodes[indentLevel - 1].className = childNodes[indentLevel - 1].className.replace( @@ -511,8 +511,8 @@ var Text = function(parentEl) { var cells = this.$lines.cells; this.$clearActiveIndentGuide(); var indentLevel = this.$highlightIndentGuideMarker.indentLevel; - if (indentLevel != 0) { - if (this.$highlightIndentGuideMarker.dir == 1) { + if (indentLevel !== 0) { + if (this.$highlightIndentGuideMarker.dir === 1) { for (var i = 0; i < cells.length; i++) { var cell = cells[i]; if (this.$highlightIndentGuideMarker.end && cell.row >= this.$highlightIndentGuideMarker.start