diff --git a/syntaxes/fortran_free-form.tmLanguage.json b/syntaxes/fortran_free-form.tmLanguage.json index 619eb14c..c0df09d9 100644 --- a/syntaxes/fortran_free-form.tmLanguage.json +++ b/syntaxes/fortran_free-form.tmLanguage.json @@ -1642,11 +1642,11 @@ { "comment": "rest of else line", "begin": "(?!(\\s*(;|!|\\n)))", - "end": "(?=[;!\\n])", + "end": "\\s*(?=[;!\\n])", "patterns": [ { "comment": "capture the label if present", - "match": "\\s*([a-z]\\w*)?\\s*\\b(\\w*)\\b", + "match": "(?i)\\s*([a-z]\\w*)?\\s*\\b(\\w*)\\b", "captures": { "1": { "name": "meta.label.else.fortran" @@ -1882,11 +1882,20 @@ "name": "keyword.control.elsewhere.fortran" } }, - "end": "(?=[;!\\n])", + "end": "\\s*(?=[;!\\n])", "patterns": [ { "include": "#parentheses" }, + { + "comment": "capture the label if present", + "match": "(?i)(\\s*[a-z]\\w*)?", + "captures": { + "1": { + "name": "meta.label.elsewhere.fortran" + } + } + }, { "include": "#invalid-word" }