diff options
| author | yum <yum.food.vr@gmail.com> | 2024-07-12 16:10:05 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-07-12 16:10:05 -0700 |
| commit | 59578a647c9e259b6eb70cd9bee5428fae2bd0b9 (patch) | |
| tree | 1b214bf355ee57f62aadba2304640f6a228ed9c7 | |
| parent | d7307f8b4d7a8871f08c5999e551b9f58d256c1c (diff) | |
Another edge case: first commit should not get a leading space
| -rw-r--r-- | Scripts/transcribe_v2.py | 5 |
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 \ |
