Fix tts.skip_tags's regex to match newlines The extension_settings.tts.skip_tags setting is meant to skip sending tags and their content to the TTS API provider. The original regular expression matched content inside tags with ".*?". Unfortunately, Javascript's engine does *not* match newlines on the "." without the /s flag. The /s flag was added in ES2018. To be more compatible, the regex has been changed to "[\s\S]+?". This gives similar performance (instead of using capture groups) and matches all content within a tag, as the original regex intended.

145136059ea5c293f640cc1c4b2d6cc3017e6283

Small Eggs <144642298+small-eggs@users.noreply.github.com>

Signed
1 files changed, +1 -1Ignore whitespace
public/scripts/extensions/tts/index.js+1 -1
@@ -466,7 +466,7 @@ async function processTtsQueue() {
466466 }
467467
468468 if (extension_settings.tts.skip_tags) {
469469 text = text.replace(/<.*?>.[\s\S]*?<\/.*?>/g, '').trim();
470470 }
471471
472472 if (!extension_settings.tts.pass_asterisks) {