Browse Source

JavaScript Highlighter: Fix potential infinite loop on bad input

master
Shadowfacts 1 month ago
parent
commit
aef05153a2
Signed by: Shadowfacts <me@shadowfacts.net> GPG Key ID: 94A5AB95422746E5
1 changed files with 0 additions and 2 deletions
  1. 0
    2
      MongoView/Synax Highlighting/JavaScriptHighlighter.swift

+ 0
- 2
MongoView/Synax Highlighting/JavaScriptHighlighter.swift View File

@@ -225,8 +225,6 @@ class JavaScriptHighlighter {
225 225
             consumeDotLookup()
226 226
         } else if char == "?" {
227 227
             consumeTernaryExpression()
228
-        } else if expressionEnds.contains(char) {
229
-            return
230 228
         } else {
231 229
             consume()
232 230
         }

Loading…
Cancel
Save