Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/tsToArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export default function parseTranscript(vtt: string): ITranscriptLine[] {
const lines: string[] = vtt.match(/\[[0-9:.]+\s-->\s[0-9:.]+\].*/g);

// 2. remove the first line, which is empty
lines.shift();
// unnecessary - this line is never empty
// lines.shift();

// 3. convert each line into an object
return lines.map(line => {
Expand All @@ -30,4 +31,4 @@ export default function parseTranscript(vtt: string): ITranscriptLine[] {

return { start, end, speech };
});
}
}