From d7307f8b4d7a8871f08c5999e551b9f58d256c1c Mon Sep 17 00:00:00 2001 From: yum Date: Fri, 12 Jul 2024 16:08:22 -0700 Subject: Edge case: initial preview should not have a space added in front of it God this code is a fucking nightmare --- Scripts/transcribe_v2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Scripts') diff --git a/Scripts/transcribe_v2.py b/Scripts/transcribe_v2.py index 94b8257..ba05dd0 100644 --- a/Scripts/transcribe_v2.py +++ b/Scripts/transcribe_v2.py @@ -844,8 +844,9 @@ def transcriptionThread(ctrl: ThreadControl): if not ctrl.transcript.endswith(' ') and not \ commit.delta.startswith(' '): commit.delta = ' ' + commit.delta - if not commit.delta.endswith(' ') and not \ - commit.preview.startswith(' '): + if len(commit.delta) > 0 and \ + (not commit.delta.endswith(' ')) and \ + (not commit.preview.startswith(' ')): commit.preview = ' ' + commit.preview ctrl.transcript += commit.delta -- cgit v1.2.3