Skip to content

Parsing an srt with a blank line between time code and text lines will error out during a .to_s #29

@jasonm23

Description

@jasonm23

An SRT file any entries with a newline before text like this:

2206
03:24:08,569 --> 03:24:12,405

This is still America, damn it.
Who wants a cowboy in the White House?

Will parse into the srt object just fine, but when being converted back to a string with to_s it'll throw an error (line.rb:36) complaining that the time isn't a float.

I expect that newlines before the text are invalid, but they're handled by the parser, so I suppose the serializer should work...

I'm working around the problem by editing the .srt file(s) to fix this for the moment, hopefully it's not too hard to fix in the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions