From 79dce0e22d0d012e5356d531c6ac8a8f456c35b4 Mon Sep 17 00:00:00 2001 From: Zarcolio Date: Fri, 2 Jun 2023 15:36:52 +0200 Subject: [PATCH] Delete Escape-DeadKeys.ps1 --- Escape-DeadKeys.ps1 | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Escape-DeadKeys.ps1 diff --git a/Escape-DeadKeys.ps1 b/Escape-DeadKeys.ps1 deleted file mode 100644 index 28fae32..0000000 --- a/Escape-DeadKeys.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$true)][string]$InputFile -) - -# Check if the input file exists -if (-not (Test-Path $InputFile)) { - Write-Error "The input file does not exist." - exit 1 -} - -# Read the contents of the input file -$content = Get-Content -Path $InputFile - -# Replace the specified characters in the content -$updatedContent = $content -replace "([~`'""^])", "$('${1}' * 2)`nBACKSPACE`nSTRING " - -# Remove lines equal to "STRING" after trimming -$updatedContent = $updatedContent.Trim() -replace "(`n|^)STRING(`n|$)", "" - - -# Prepare the output file name by adding "-edit" before the file extension -$outputFile = [System.IO.Path]::GetFileNameWithoutExtension($InputFile) + "-edit" + [System.IO.Path]::GetExtension($InputFile) - -# Write the updated content to the output file -Set-Content -Path $outputFile -Value $updatedContent