asticode / go-astisub

Manipulate subtitles in GO (.srt, .ssa/.ass, .stl, .ttml, .vtt (webvtt), teletext, etc.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

srtTimeBoundariesSeparator will lead to incorrect results

eager7 opened this issue · comments

const (
srtTimeBoundariesSeparator = " --> "
)

when the srt content is like:

1
00:08:29,079 -->00:08:30,119
hello

because there lose a space, this line will not be indefiy, output string will be nothing.

i hope return a error for this

As the .srt you're mentionning is not valid, the only thing this lib could do is return an error. However the way things are done, it's not trivial to do it while changing the least amount of code. I'll add it to this project's todo but won't have time to work on it anytime soon