Skip to content

Commit 146e421

Browse files
omniomivors
authored andcommitted
Comment keys (#120)
* Fix #119
1 parent 0cf060e commit 146e421

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

PowerShellSyntax.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@
626626
</dict>
627627
</dict>
628628
<key>match</key>
629-
<string>(?i:\s*(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))</string>
629+
<string>^(?i:(?:\s*|#)+(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))</string>
630630
<key>name</key>
631631
<string>comment.documentation.embedded.powershell</string>
632632
</dict>

spec/testfiles/syntax_test_Function.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ using module Microsoft.PowerShell.Management
4646
# <- constant.string.documentation.powershell
4747
# ^ keyword.operator.documentation.powershell
4848
The functionality that best describes this cmdlet
49+
50+
This should not be considered documentaton -> .role
51+
# ^ not:keyword.operator.documentation.powershell
4952
#>
5053
# <- punctuation.definition.comment.block.end.powershell
5154
function Verb-Noun {

0 commit comments

Comments
 (0)