diff --git a/PowerShellSyntax.tmLanguage b/PowerShellSyntax.tmLanguage index e4c334f..93ace13 100644 --- a/PowerShellSyntax.tmLanguage +++ b/PowerShellSyntax.tmLanguage @@ -626,7 +626,7 @@ match - (?i:\s*(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS)) + ^(?i:(?:\s*|#)+(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS)) name comment.documentation.embedded.powershell diff --git a/spec/testfiles/syntax_test_Function.ps1 b/spec/testfiles/syntax_test_Function.ps1 index 6076bff..c297d21 100644 --- a/spec/testfiles/syntax_test_Function.ps1 +++ b/spec/testfiles/syntax_test_Function.ps1 @@ -46,6 +46,9 @@ using module Microsoft.PowerShell.Management # <- constant.string.documentation.powershell # ^ keyword.operator.documentation.powershell The functionality that best describes this cmdlet + + This should not be considered documentaton -> .role + # ^ not:keyword.operator.documentation.powershell #> # <- punctuation.definition.comment.block.end.powershell function Verb-Noun {