From 46dd05fe041a4306c417f3927fd23f96a3caaa5a Mon Sep 17 00:00:00 2001 From: Fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:23:11 +0500 Subject: [PATCH] fix: sentence tags to account for numbered lists and preserve remaining text Address sentence matching in numbered lists by including remaining text for accurate word alignment preservation (by compromising the sentence highlighting on such cases eg. numbered lists) --- tts-highlighter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tts-highlighter.js b/tts-highlighter.js index 87a8d0d..9609338 100644 --- a/tts-highlighter.js +++ b/tts-highlighter.js @@ -69,7 +69,7 @@ var TtsHighlighter = { } } - this.text_element.innerHTML = processed_text; + this.text_element.innerHTML = processed_text + remaining_text; }, /** @@ -339,4 +339,4 @@ var TtsHighlighter = { that.selectCurrentWord(); }, false); } -}; \ No newline at end of file +};