From f619b44efe17bccb6d8be458f95103ad541b888d Mon Sep 17 00:00:00 2001 From: matteocoder <22897138+matteocoder@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:08:55 +0100 Subject: [PATCH] Add missing comment-based help keywords Additionally, add tests for all the comment-based help keywords. --- PowerShell.sublime-syntax | 4 +-- Tests/syntax_test_PowerShell.ps1 | 47 ++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/PowerShell.sublime-syntax b/PowerShell.sublime-syntax index 1d1e363..a5c9c3e 100644 --- a/PowerShell.sublime-syntax +++ b/PowerShell.sublime-syntax @@ -357,8 +357,8 @@ contexts: (?xi: ^\s*(\.) ( - Component | Description | Example | ForwardHelpTargetName - | Functionality | Inputs | Notes | Outputs | RemoteHelpRunSpace + Component | Description | Example | ExternalHelp | ForwardHelpCategory | ForwardHelpTargetName + | Functionality | Inputs | Link | Notes | Outputs | Parameter | RemoteHelpRunSpace | Role | Synopsis ) ) diff --git a/Tests/syntax_test_PowerShell.ps1 b/Tests/syntax_test_PowerShell.ps1 index f1380ee..c9b7626 100644 --- a/Tests/syntax_test_PowerShell.ps1 +++ b/Tests/syntax_test_PowerShell.ps1 @@ -1534,3 +1534,50 @@ get-thing | Out-WithYou > $null # destroy # ^^^^^^^^^^^^^^^^^ variable.language - punctuation # ^ variable.language punctuation # ^^^^^^^^^^^^^^^^ variable.language - punctuation +<# +.SYNOPSIS +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^ keyword.other.documentation +.DESCRIPTION +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^^^^ keyword.other.documentation +.PARAMETER +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^ keyword.other.documentation +.EXAMPLE +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^ keyword.other.documentation +.INPUTS +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^ keyword.other.documentation +.OUTPUTS +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^ keyword.other.documentation +.NOTES +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^ keyword.other.documentation +.LINK +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^ keyword.other.documentation +.COMPONENT +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^^ keyword.other.documentation +.ROLE +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^ keyword.other.documentation +.FUNCTIONALITY +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^^^^^^ keyword.other.documentation +.FORWARDHELPTARGETNAME +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^^^^^^^^^^^^^^ keyword.other.documentation +.FORWARDHELPCATEGORY +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^^^^^^^^^^^^ keyword.other.documentation +.REMOTEHELPRUNSPACE +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^^^^^^^^^^^ keyword.other.documentation +.EXTERNALHELP +#<- comment.block.powershell comment.documentation.embedded.powershell punctuation.definition.keyword.documentation.powershell +#^^^^^^^^^^^^ keyword.other.documentation +#>