File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,10 @@ $($Keywords -join '|') # followed by keywords
7575(?<HereDoc>@){0,1} # Optional heredoc start
7676['`"] # String start
7777(?(HereDoc)([\r\n]{1,2})) # If we found a heredoc, the next portion of the match must be 1-2 newlines/carriage returns
78- / # Followed by a slash
78+ /
7979'@ , Options= ' IgnoreCase,IgnorePatternWhitespace' )]
8080[ValidatePattern (@'
81- / # closing slash
81+ / # a closing slash
8282(?<Options>[\w,]+){0,1} # optional options
8383(?(HereDoc)([\r\n]{1,2})) # If we found a heredoc, the next portion of the match must be 1-2 newlines/carriage returns
8484['`"]
@@ -114,7 +114,11 @@ process {
114114 $ExpandableStringExpression.Extent.ToString (), $ExpandableStringExpression.StringConstantType
115115 }
116116
117- $sparseStringExpr = $StringExpr -replace $startRegex -replace $endRegex
117+
118+ $sparseStringExpr = $StringExpr -replace $endRegex -replace $startRegex
119+ if ($sparseStringExpr -match ' ^@{0,1}["'' ]' ) {
120+ return
121+ }
118122 $null = $StringExpr -match $endRegex
119123 $stringStart , $stringEnd =
120124 if ($stringType -eq ' SingleQuotedHereString' ) {
You can’t perform that action at this time.
0 commit comments