test(editor): Add tests for handling extended characters, emojis, and special key inputs

This commit is contained in:
Mario Rodler 2025-11-16 18:15:21 +01:00
parent c8dcf1cdae
commit ce0c42f539
2 changed files with 172 additions and 1 deletions

View file

@ -472,7 +472,7 @@ export class Editor implements Component {
// Filter out non-printable characters except newlines
const filteredText = tabExpandedText
.split("")
.filter((char) => char === "\n" || (char >= " " && char <= "~"))
.filter((char) => char === "\n" || char.length > 0)
.join("");
// Split into lines