diff --git a/PowerShellSyntax.tmLanguage b/PowerShellSyntax.tmLanguage
index 400932d..cad1da0 100644
--- a/PowerShellSyntax.tmLanguage
+++ b/PowerShellSyntax.tmLanguage
@@ -413,10 +413,10 @@
commentLine
begin
- (?<![`\\-])#
+ (?<![`\\-])(#)#*
captures
- 0
+ 1
name
punctuation.definition.comment.powershell
@@ -581,8 +581,10 @@
keyword.operator.documentation.powershell
+ comment
+ these embedded doc keywords do not support arguments, must be the only thing on the line
match
- ^(?i:(?:\s?|#)+(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))
+ (?:^|\G)(?i:\s*(\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\s*$
name
comment.documentation.embedded.powershell
@@ -605,8 +607,10 @@
keyword.operator.documentation.powershell
+ comment
+ 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
match
- (?i:\s?(\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\s+([a-z0-9-_]+))
+ (?:^|\G)(?i:\s*(\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\s+(.+?)\s*$
name
comment.documentation.embedded.powershell