[javascript mode] Improve handling of &&, ||, and ?? operators
Closes #6394
This commit is contained in:
parent
75f20016cf
commit
62d84abb72
|
@ -111,7 +111,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||||
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
|
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
|
||||||
if (stream.eat("=")) {
|
if (stream.eat("=")) {
|
||||||
if (ch == "!" || ch == "=") stream.eat("=")
|
if (ch == "!" || ch == "=") stream.eat("=")
|
||||||
} else if (/[<>*+\-]/.test(ch)) {
|
} else if (/[<>*+\-|&?]/.test(ch)) {
|
||||||
stream.eat(ch)
|
stream.eat(ch)
|
||||||
if (ch == ">") stream.eat(ch)
|
if (ch == ">") stream.eat(ch)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue