diff --git a/src/extensions/core/editAttention.js b/src/extensions/core/editAttention.ts similarity index 99% rename from src/extensions/core/editAttention.js rename to src/extensions/core/editAttention.ts index fc8da36a1b..b9908e9cf7 100644 --- a/src/extensions/core/editAttention.js +++ b/src/extensions/core/editAttention.ts @@ -91,11 +91,11 @@ app.registerExtension({ } else { // Select the current word, find the start and end of the word const delimiters = " .,\\/!?%^*;:{}=-_`~()\r\n\t"; - + while (!delimiters.includes(inputField.value[start - 1]) && start > 0) { start--; } - + while (!delimiters.includes(inputField.value[end]) && end < inputField.value.length) { end++; }