From 80a9073870c915a305c04b095956dd9bcd037807 Mon Sep 17 00:00:00 2001 From: circle33 Date: Sat, 11 Nov 2023 12:34:06 +0800 Subject: [PATCH 1/2] fix: sometimes skips words --- src/TTSServiceImplementation.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/TTSServiceImplementation.ts b/src/TTSServiceImplementation.ts index 07612c1..19e0dea 100644 --- a/src/TTSServiceImplementation.ts +++ b/src/TTSServiceImplementation.ts @@ -43,9 +43,6 @@ export class TTSServiceImplementation implements TTSService { content = content.replace(/\*/g, ""); content = content.replace(/\^/g, ""); content = content.replace(/==/g, ""); - - //block references - content = content.replace(/^\S{6}/g, ""); } if (!this.plugin.settings.speakLinks) { //regex from https://stackoverflow.com/a/37462442/5589264 From 5539f3560b9fb21b2cff95213948830d9f5e39ab Mon Sep 17 00:00:00 2001 From: circle33 Date: Sat, 9 Dec 2023 19:40:51 +0800 Subject: [PATCH 2/2] fix: sometimes skips words --- src/TTSServiceImplementation.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TTSServiceImplementation.ts b/src/TTSServiceImplementation.ts index 19e0dea..0667575 100644 --- a/src/TTSServiceImplementation.ts +++ b/src/TTSServiceImplementation.ts @@ -43,6 +43,9 @@ export class TTSServiceImplementation implements TTSService { content = content.replace(/\*/g, ""); content = content.replace(/\^/g, ""); content = content.replace(/==/g, ""); + + //block references + content = content.replace(/\^\S*/g, ""); } if (!this.plugin.settings.speakLinks) { //regex from https://stackoverflow.com/a/37462442/5589264