Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions PowerShellSyntax.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@
</dict>
</dict>
<key>match</key>
<string>(?i:(\$|@)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))</string>
<string>(?i:(\$)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))</string>
</dict>
<dict>
<key>captures</key>
Expand Down Expand Up @@ -1592,10 +1592,6 @@
<key>include</key>
<string>#variableNoProperty</string>
</dict>
<dict>
<key>include</key>
<string>#variable</string>
</dict>
<dict>
<key>include</key>
<string>#doubleQuotedStringEscapes</string>
Expand Down
9 changes: 9 additions & 0 deletions spec/testfiles/syntax_test_TheBigTestFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ $variable.Name
# ^^^^^^^^^^^^ variable.other.readwrite.powershell
# ^ punctuation.definition.string.end.powershell

# @splat references only work in argument mode, should not highlight in strings
"This is a @double quoted string."
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.powershell
# ^ not:punctuation.definition.variable.powershell
# ^ not:variable.other.readwrite.powershell

# Single quotes string
'This is a string'
# <- punctuation.definition.string.begin.powershell string.quoted.single.powershell
Expand Down Expand Up @@ -369,6 +375,9 @@ $This is a 'double quoted'
# <- punctuation.definition.variable.powershell
# ^ string.quoted.double.heredoc.powershell support.variable.automatic.powershell
Isn't it "nice"??
There is no @platting here!
# ^ not:punctuation.definition.variable.powershell
# ^ not:variable.other.readwrite.powershell
"@
# <- string.quoted.double.heredoc.powershell
# <- string.quoted.double.heredoc.powershell
Expand Down