diff --git a/PowerShellSyntax.tmLanguage b/PowerShellSyntax.tmLanguage index 327a2cf..43adbba 100644 --- a/PowerShellSyntax.tmLanguage +++ b/PowerShellSyntax.tmLanguage @@ -1393,7 +1393,7 @@ match - (?i:(\$|@)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+)) + (?i:(\$)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+)) captures @@ -1592,10 +1592,6 @@ include #variableNoProperty - - include - #variable - include #doubleQuotedStringEscapes diff --git a/spec/testfiles/syntax_test_TheBigTestFile.ps1 b/spec/testfiles/syntax_test_TheBigTestFile.ps1 index 79fc64d..340e685 100644 --- a/spec/testfiles/syntax_test_TheBigTestFile.ps1 +++ b/spec/testfiles/syntax_test_TheBigTestFile.ps1 @@ -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 @@ -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