fix: Prevent Duplicate TTS Text From Nested Formatting (Closes #1994)

This commit is contained in:
Rajarshee Chatterjee
2026-08-18 11:26:55 +05:30
parent 09652f9962
commit 5a0717d2c7
+3
View File
@@ -332,6 +332,9 @@ window.tts = new (function () {
if (!el) return;
if (this.readable(el)) {
elements.push(el);
// innerText already includes readable descendants, so descending any
// further would add overlapping text to the speech queue.
return;
}
for (let i = 0; i < el.children.length; i++) {
traverse(el.children[i]);