From 59578a647c9e259b6eb70cd9bee5428fae2bd0b9 Mon Sep 17 00:00:00 2001 From: yum Date: Fri, 12 Jul 2024 16:10:05 -0700 Subject: Another edge case: first commit should not get a leading space --- Scripts/transcribe_v2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Scripts/transcribe_v2.py b/Scripts/transcribe_v2.py index ba05dd0..63d7f52 100644 --- a/Scripts/transcribe_v2.py +++ b/Scripts/transcribe_v2.py @@ -841,8 +841,9 @@ def transcriptionThread(ctrl: ThreadControl): print(f"commit thresh: {commit.thresh_at_commit}", file=sys.stderr) - if not ctrl.transcript.endswith(' ') and not \ - commit.delta.startswith(' '): + if len(ctrl.transcript) > 0 and \ + (not ctrl.transcript.endswith(' ')) and \ + (not commit.delta.startswith(' ')): commit.delta = ' ' + commit.delta if len(commit.delta) > 0 and \ (not commit.delta.endswith(' ')) and \ -- cgit v1.2.3