Skip to content

Commit a848a93

Browse files
committed
fix(langserver): corrected coloring of test case/keyword names if names contains line continuations ...
fixes: #290
1 parent 4cf0127 commit a848a93

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

syntaxes/robotframework.tmLanguage.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,29 @@
149149
},
150150
"testcase_name": {
151151
"contentName": "string.unquoted.argument.robotframework",
152-
"begin": "^( ?\\S+ ?\\S*)(?= {2}| ?\\t| ?$)",
152+
"begin": "^( ?\\S+ ?(\\S* ?)*?)(?= {2}| ?\\t| ?$)",
153153
"beginCaptures": { "1": { "name": "entity.name.function.testcase.name.robotframework" } },
154-
"end": "^(?!(\\s*(\\.\\.\\.((( {2}| ?\\t)\\s*\\S.*)|(\\s*))?$))|(\\s*#.*$)|(\\s*$))"
154+
"end": "^(?!(\\s*(\\.\\.\\.((( {2}| ?\\t)\\s*\\S.*)|(\\s*))?$))|(\\s*#.*$)|(\\s*$))",
155+
"patterns": [
156+
{ "include": "#escape" },
157+
{ "include": "#comment" },
158+
{ "include": "#comment_line" },
159+
{ "include": "#variables" },
160+
{ "include": "#line_continuation" }
161+
]
155162
},
156163
"keyword_name": {
157164
"contentName": "string.unquoted.argument.robotframework",
158-
"begin": "^( ?\\S+ ?\\S*)(?= {2}| ?\\t| ?$)",
165+
"begin": "^( ?\\S+ ?(\\S* ?)*?)(?= {2}| ?\\t| ?$)",
159166
"beginCaptures": { "1": { "name": "entity.name.function.keyword.name.robotframework" } },
160-
"end": "^(?!(\\s*(\\.\\.\\.((( {2}| ?\\t)\\s*\\S.*)|(\\s*))?$))|(\\s*#.*$)|(\\s*$))"
167+
"end": "^(?!(\\s*(\\.\\.\\.((( {2}| ?\\t)\\s*\\S.*)|(\\s*))?$))|(\\s*#.*$)|(\\s*$))",
168+
"patterns": [
169+
{ "include": "#escape" },
170+
{ "include": "#comment" },
171+
{ "include": "#comment_line" },
172+
{ "include": "#variables" },
173+
{ "include": "#line_continuation" }
174+
]
161175
},
162176
"block_statements": {
163177
"patterns": [

0 commit comments

Comments
 (0)