JavaScript Highlighter: Fix potential infinite loop on bad input
This commit is contained in:
parent
4c65ff612d
commit
aef05153a2
|
@ -225,8 +225,6 @@ class JavaScriptHighlighter {
|
||||||
consumeDotLookup()
|
consumeDotLookup()
|
||||||
} else if char == "?" {
|
} else if char == "?" {
|
||||||
consumeTernaryExpression()
|
consumeTernaryExpression()
|
||||||
} else if expressionEnds.contains(char) {
|
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
consume()
|
consume()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue