diff --git a/lib/rouge/lexers/powershell.rb b/lib/rouge/lexers/powershell.rb index 1f76892e9b..f87c3846a1 100644 --- a/lib/rouge/lexers/powershell.rb +++ b/lib/rouge/lexers/powershell.rb @@ -218,6 +218,7 @@ class Powershell < RegexLexer push :parameters unless m[3].nil? end + rule %r/\?/, Name::Function, :parameters rule %r/[-+*\/%=!.&|]/, Operator rule %r/@\{/, Punctuation, :hasht rule %r/@\(/, Punctuation, :array diff --git a/spec/visual/samples/powershell b/spec/visual/samples/powershell index d27f754479..ee5567d6c9 100644 --- a/spec/visual/samples/powershell +++ b/spec/visual/samples/powershell @@ -199,3 +199,6 @@ $gitExeString = "$gitExeFolder\git.exe" &("$gitExeString") config --add --global Get-ChildItem -Include *.txt ` -Recurse Write-Output `$hello + +# Where-Object alias +Get-process | ? {$_.workingset -gt 25000*1024}