Skip to content

Commit 2437aa1

Browse files
Bug fix for issue 1042 - Gauge comment syntax highlighter conflicted with default comment highlighter for other langauges. (#1044)
Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>
1 parent 7009fae commit 2437aa1

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"description": "Gauge support for VScode.",
99
"author": "ThoughtWorks",
1010
"license": "MIT",
11-
"version": "0.1.8",
11+
"version": "0.1.9",
1212
"publisher": "getgauge",
1313
"engines": {
1414
"vscode": "^1.71.0"

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"tagValue": { "foreground": colors.tagValue },
5151
"specification": { "foreground": colors.specification },
5252
"scenario": { "foreground": colors.scenario },
53-
"comment": { "foreground": colors.comment },
53+
"gaugeComment": { "foreground": colors.comment },
5454
"disabledStep": { "foreground": colors.disabledStep }
5555
};
5656

src/semanticTokensProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const tokenTypes = [
1212
'tagKeyword', // For the literal "tags:" at the beginning of a tag line
1313
'tagValue', // For the remainder of a tag line after "tags:"
1414
'disabledStep', // For lines starting with "//" (used to disable a step)
15-
'comment' // For lines that do not match any of the above (fallback comment lines)
15+
'gaugeComment' // For lines that do not match any of the above (fallback comment lines)
1616
];
1717
const tokenModifiers: string[] = [];
1818
export const legend = new vscode.SemanticTokensLegend(tokenTypes, tokenModifiers);
@@ -175,7 +175,7 @@ export class GaugeSemanticTokensProvider implements vscode.DocumentSemanticToken
175175
else {
176176
// For any other non-empty line, mark it as a comment.
177177
if (trimmedLine.length > 0) {
178-
builder.push(i, 0, line.length, tokenTypes.indexOf('comment'), 0);
178+
builder.push(i, 0, line.length, tokenTypes.indexOf('gaugeComment'), 0);
179179
}
180180
i++;
181181
}

0 commit comments

Comments
 (0)