refactor(tts): remove redundant 4-space codeblock filter (#5406) * refactor(tts): remove redundant 4-space codeblock filter - Deleted the regex that removed lines starting with four spaces. - Original intent was to strip "indented code blocks" (Markdown legacy syntax). - In practice, SillyTavern already handles explicit code fences (```...``` and ~~~...~~~). - Indented code blocks are rarely used and the regex caused unnecessary text loss in normal messages. - Simplifies codeblock skipping logic and avoids accidental removal of valid content. * Remove commented out code --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Signed| @@ -674,7 +674,6 @@ async function processTtsQueue() { | |||
| 674 | text = substituteParams(text); | 674 | text = substituteParams(text); |
| 675 | 675 | ||
| 676 | if (extension_settings.tts.skip_codeblocks) { | 676 | if (extension_settings.tts.skip_codeblocks) { |
| 677 | text = text.replace(/^\s{4}.*$/gm, '').trim(); | ||
| 678 | text = text.replace(/```.*?```/gs, '').trim(); | 677 | text = text.replace(/```.*?```/gs, '').trim(); |
| 679 | text = text.replace(/~~~.*?~~~/gs, '').trim(); | 678 | text = text.replace(/~~~.*?~~~/gs, '').trim(); |
| 680 | } | 679 | } |