Эх сурвалжийг харах

fixed regex to reflect my issue

Akira Kido 7 жил өмнө
parent
commit
c20909fdb3

+ 1 - 4
src/gdscript/diagnostic.ts

@@ -112,11 +112,8 @@ class GDScriptDiagnosticSeverity {
           return
         if(line.match(new RegExp(`.*?#.*?\\s${keywords[1]}\\s.*?`)))
           return
-        if(line.match(/.*?\sif\s+(\!|\[|\{|\w).*?\s+else\s+[^\s]+/))
+        if(line.match(/.*?\sif\s+(\!|\[|\{|\w|").*?\s+else\s+[^\s]+/))
           return
-        if(line.match(/.*?if.*else.*/)) {
-          return
-        }
         if (line.match(/.*?\\/))
           expectEndOfLine = true;
         else if (line.match(/.*?\:[\s+]+[^#\s]+/))