Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to Comment Based Help Keywords #175

Merged
merged 1 commit into from Mar 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions PowerShellSyntax.tmLanguage
Expand Up @@ -388,10 +388,10 @@
<key>commentLine</key>
<dict>
<key>begin</key>
<string>(?&lt;![`\\-])#</string>
<string>(?&lt;![`\\-])(#)#*</string>
<key>captures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.powershell</string>
Expand Down Expand Up @@ -556,8 +556,10 @@
<string>keyword.operator.documentation.powershell</string>
</dict>
</dict>
<key>comment</key>
<string>these embedded doc keywords do not support arguments, must be the only thing on the line</string>
<key>match</key>
<string>^(?i:(?:\s?|#)+(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))</string>
<string>(?:^|\G)(?i:\s*(\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\s*$</string>
<key>name</key>
<string>comment.documentation.embedded.powershell</string>
</dict>
Expand All @@ -580,8 +582,10 @@
<string>keyword.operator.documentation.powershell</string>
</dict>
</dict>
<key>comment</key>
<string>these embedded doc keywords require arguments though the type required may be inconsistent, they may not all be able to use the same argument match</string>
<key>match</key>
<string>(?i:\s?(\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\s+([a-z0-9-_]+))</string>
<string>(?:^|\G)(?i:\s*(\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\s+(.+?)\s*$</string>
<key>name</key>
<string>comment.documentation.embedded.powershell</string>
</dict>
Expand Down