Skip to content

Commit

Permalink
[javascript mode] Improve handling of &&, ||, and ?? operators
Browse files Browse the repository at this point in the history
Closes #6394
  • Loading branch information
marijnh committed Aug 22, 2020
1 parent 75f2001 commit 62d84ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/javascript/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
if (stream.eat("=")) {
if (ch == "!" || ch == "=") stream.eat("=")
} else if (/[<>*+\-]/.test(ch)) {
} else if (/[<>*+\-|&?]/.test(ch)) {
stream.eat(ch)
if (ch == ">") stream.eat(ch)
}
Expand Down

0 comments on commit 62d84ab

Please sign in to comment.