Skip to content

Commit 2861832

Browse files
committed
v0.0.7: Fix bang-comment region to preserve parameter name highlighting
1 parent 7326b21 commit 2861832

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.0.7
4+
5+
- Fixed inline `!` comment handling: parameter names inside `! ParameterName - description` style lines are now highlighted correctly while the description remains styled as a comment
6+
37
## 0.0.6
48

59
- Fixed inline `!` comments: now the full comment text after `!` is highlighted, not just the `!` character itself

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "openfast-rosco-syntax-highlighting",
33
"displayName": "OpenFAST, ROSCO & TurbSim Syntax Highlighting",
44
"description": "Syntax highlighting for OpenFAST, ROSCO, and TurbSim input and output files in Visual Studio Code.",
5-
"version": "0.0.6",
5+
"version": "0.0.7",
66
"publisher": "SMI-Lab",
77
"repository": {
88
"type": "git",

syntaxes/openfast.tmLanguage.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,21 @@
325325
"bang-comments": {
326326
"patterns": [
327327
{
328-
"name": "comment.line.bang.openfast",
329-
"match": "(?<=\\S)\\s+!.*$"
328+
"begin": "(?<=\\s)(!)",
329+
"beginCaptures": {
330+
"1": {
331+
"name": "punctuation.definition.comment.openfast"
332+
}
333+
},
334+
"end": "$",
335+
"patterns": [
336+
{
337+
"include": "#parameter-names"
338+
},
339+
{
340+
"include": "#trailing-descriptions"
341+
}
342+
]
330343
}
331344
]
332345
},

0 commit comments

Comments
 (0)