fix(transcript): add condition when concatenating sub text to prevent second line duplication

This commit is contained in:
Yassine Doghri 2024-01-17 09:15:28 +00:00
parent 28a31ca03b
commit 6cbfec0d7d
1 changed files with 2 additions and 5 deletions

View File

@ -78,13 +78,10 @@ class TranscriptParser
$sub->text = trim($subText);
$subText = '';
$state = SRT_STATE_SUBNUMBER;
$subs[] = $sub;
} elseif ($subText !== '') {
$subText .= PHP_EOL . $line;
} else {
if ($subText !== '') {
$subText .= PHP_EOL . $line;
}
$subText .= $line;
}