summaryrefslogtreecommitdiffstats
path: root/Scripts/transcribe_v2.py
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-07-12 16:10:05 -0700
committeryum <yum.food.vr@gmail.com>2024-07-12 16:10:05 -0700
commit59578a647c9e259b6eb70cd9bee5428fae2bd0b9 (patch)
tree1b214bf355ee57f62aadba2304640f6a228ed9c7 /Scripts/transcribe_v2.py
parentd7307f8b4d7a8871f08c5999e551b9f58d256c1c (diff)
Another edge case: first commit should not get a leading space
Diffstat (limited to 'Scripts/transcribe_v2.py')
-rw-r--r--Scripts/transcribe_v2.py5
1 files 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 \