From 99d88a0a466ed08e37224d8edd4e80a65072ea51 Mon Sep 17 00:00:00 2001 From: "Mr.k" Date: Fri, 26 Jul 2024 00:27:29 +0300 Subject: [PATCH] Replace Tabs with Spaces to follow the conventions --- Compile.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Compile.ps1 b/Compile.ps1 index e5399475..489bc3ef 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -15,12 +15,12 @@ function Update-Progress { [Parameter(Mandatory, position=0)] [string]$StatusMessage, - [Parameter(Mandatory, position=1)] - [ValidateRange(0,100)] + [Parameter(Mandatory, position=1)] + [ValidateRange(0,100)] [int]$Percent, - [Parameter(position=2)] - [string]$Activity = "Compiling" + [Parameter(position=2)] + [string]$Activity = "Compiling" ) Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent @@ -65,15 +65,15 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach- # Use **HTML decimal/hex codes instead**, as using HTML Entity Codes will result in XML parse Error when running the compiled script. for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) { $firstLevelName = $firstLevelJsonList[$i] - if ($jsonAsObject.$firstLevelName.content -ne $null) { + if ($jsonAsObject.$firstLevelName.content -ne $null) { $jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—') $jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop } if ($jsonAsObject.$firstLevelName.description -ne $null) { $jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—') $jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop - } - } + } + } # Add 'WPFInstall' as a prefix to every entry-name in 'applications.json' file if ($psitem.Name -eq "applications.json") {