Update Replace Regex for Code Formatting in 'Do-PreProcessing' Script Tool

This commit is contained in:
Mr.k 2024-07-26 06:51:46 +03:00
parent 177bbc752b
commit 1803337574
No known key found for this signature in database

View File

@ -42,11 +42,10 @@ function Do-PreProcessing {
-replace ('\t', ' ') ` -replace ('\t', ' ') `
-replace ('\)\{', ') {') ` -replace ('\)\{', ') {') `
-replace ('\)\r?\n\s*{', ') {') ` -replace ('\)\r?\n\s*{', ') {') `
-replace ('Try \{', 'try {') ` -replace ('Try(\s*)?\{', 'try {') `
-replace ('try\{', 'try {') `
-replace ('try\r?\n\s*\{', 'try {') ` -replace ('try\r?\n\s*\{', 'try {') `
-replace ('}\r?\n\s*catch', '} catch') ` -replace ('}\r?\n\s*catch', '} catch') `
-replace ('\} Catch', '} catch') ` -replace ('\}(\s*)?Catch', '} catch') `
| Set-Content "$file" | Set-Content "$file"
Write-Progress -Activity $ProgressActivity -Status "$ProgressStatusMessage - Finished $i out of $numOfFiles" -PercentComplete (($i/$numOfFiles)*100) Write-Progress -Activity $ProgressActivity -Status "$ProgressStatusMessage - Finished $i out of $numOfFiles" -PercentComplete (($i/$numOfFiles)*100)
} }