소스 검색

fixed regex to reflect my issue

Akira Kido 7 년 전
부모
커밋
c20909fdb3
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      src/gdscript/diagnostic.ts

+ 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]+/))