always use ALTSTRING

This commit is contained in:
Zarcolio
2023-07-15 10:46:11 +02:00
committed by GitHub
parent 5a4ae9a3d8
commit 84bb87e034
+1 -14
View File
@@ -254,11 +254,7 @@ You can edit this manually before saving, if needed."></textarea>
continue; // Skip empty lines
}
if (hasDeadKeys(line)) {
translatedInput += `ALTCODE ${line}\n`;
} else {
translatedInput += `STRING ${line}\n`;
}
translatedInput += `ALTSTRING ${line}\n`;
}
// If the input does not end with a new line, append a new line to the translated input
@@ -283,11 +279,7 @@ You can edit this manually before saving, if needed."></textarea>
continue; // Skip empty lines
}
if (hasDeadKeys(line)) {
translatedInput += `ALTCODE ${line}\n`;
} else {
translatedInput += `REM ${line}\n`;
}
}
// If the input does not end with a new line, append a new line to the translated input
@@ -299,11 +291,6 @@ You can edit this manually before saving, if needed."></textarea>
input.value = ''; // Clear the input
}
function hasDeadKeys(input) {
const deadKeys = /[`^~"']/;
return deadKeys.test(input);
}
function appendToOutput(value) {
const output = document.getElementById('output');
if (value === 'CTRL' || value === 'CONTROL' || value === 'SHIFT' || value === 'ALT' || value === 'GUI' ) {