From d5a9b53bdce4443da3bfc2820143478bcf5288c5 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 19 Feb 2021 10:54:55 +0800 Subject: [PATCH] replace tabs with 4-space (#8739) --- .../src/main/resources/powershell/Build.ps1.mustache | 12 ++++++------ samples/client/petstore/powershell/Build.ps1 | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache b/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache index 79419594858..6fed374afbd 100644 --- a/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache @@ -22,17 +22,17 @@ function Get-FunctionsToExport { throw $ParserErr } else { foreach ($name in 'Begin', 'Process', 'End') { - foreach ($Statement in $Ast."${name}Block".Statements) { - if ( + foreach ($Statement in $Ast."${name}Block".Statements) { + if ( [String]::IsNullOrWhiteSpace($Statement.Name) -or $Statement.Extent.ToString() -notmatch ('function\W+{0}' -f $Statement.Name) ) { - continue - } + continue + } - $Statement.Name - } + $Statement.Name + } } } } diff --git a/samples/client/petstore/powershell/Build.ps1 b/samples/client/petstore/powershell/Build.ps1 index d892ed4513e..dc4e005472d 100644 --- a/samples/client/petstore/powershell/Build.ps1 +++ b/samples/client/petstore/powershell/Build.ps1 @@ -28,17 +28,17 @@ function Get-FunctionsToExport { throw $ParserErr } else { foreach ($name in 'Begin', 'Process', 'End') { - foreach ($Statement in $Ast."${name}Block".Statements) { - if ( + foreach ($Statement in $Ast."${name}Block".Statements) { + if ( [String]::IsNullOrWhiteSpace($Statement.Name) -or $Statement.Extent.ToString() -notmatch ('function\W+{0}' -f $Statement.Name) ) { - continue - } + continue + } - $Statement.Name - } + $Statement.Name + } } } }