diff --git a/FourThingsToLearnPowerShell/Start-Demo.ps1 b/FourThingsToLearnPowerShell/Start-Demo.ps1 index f0a16dd..63c40cd 100644 --- a/FourThingsToLearnPowerShell/Start-Demo.ps1 +++ b/FourThingsToLearnPowerShell/Start-Demo.ps1 @@ -103,7 +103,7 @@ NOTE: Start-Demo replaces the typing but runs the actual commands. } # else - if(($_lines[$_i] -match '\)' -and $_lines[$_i+1] -match '\{') -or ($_lines[$_i] -match '\){')) + if(($_lines[$_i] -match '\)' -and $_lines[$_i+1] -match '\{') -or ($_lines[$_i] -match '\)\s?{')) { $justKeepSwinging++ } diff --git a/Start-Demo.ps1 b/Start-Demo.ps1 index f0a16dd..63c40cd 100644 --- a/Start-Demo.ps1 +++ b/Start-Demo.ps1 @@ -103,7 +103,7 @@ NOTE: Start-Demo replaces the typing but runs the actual commands. } # else - if(($_lines[$_i] -match '\)' -and $_lines[$_i+1] -match '\{') -or ($_lines[$_i] -match '\){')) + if(($_lines[$_i] -match '\)' -and $_lines[$_i+1] -match '\{') -or ($_lines[$_i] -match '\)\s?{')) { $justKeepSwinging++ }