SublimeText / PowerShell

Support for the MS PowerShell programming language.
MIT License
312 stars 80 forks source link

Scriptblocks in ValidateScript #138

Closed Jaykul closed 6 years ago

Jaykul commented 8 years ago

Script blocks inside attributes should be highlighted...

function Validate-Attribute {
    [CmdletBinding()]
    param(
        [Parameter(Position=1, Mandatory=$true)]
        [ValidateScript({if($Script:Roles -contains $_){ $True } else { throw "$_ is not a valid Role. Please use one of: $Script:Roles"}})]
        [String[]]$Role
   )
   # ...
}