[javascript mode] Improve handling of &&, ||, and ?? operators

Closes #6394
This commit is contained in:
Marijn Haverbeke 2020-08-22 17:24:50 +02:00
parent 75f20016cf
commit 62d84abb72
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}