Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize extra newlines. #14

Merged
merged 1 commit into from
Feb 27, 2017
Merged

Normalize extra newlines. #14

merged 1 commit into from
Feb 27, 2017

Conversation

jdalton
Copy link
Contributor

@jdalton jdalton commented Feb 27, 2017

This PR fixes errors that happen when srt's contain extra newlines.
For example:

22
00:04:30,868 --> 00:04:30,946


23
00:04:32,711 --> 00:04:34,806

Currently if the parser hits the extra blank line it treats it like an entry and will fail to parse its toMS.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f83fd72 on jdalton:newline into fe22972 on gsantiago:master.

@gsantiago gsantiago merged commit 56df36a into gsantiago:master Feb 27, 2017
@gsantiago
Copy link
Owner

I can't believe the creator of lodash has sent me a PR.

Thanks!

@jdalton
Copy link
Contributor Author

jdalton commented Feb 27, 2017

I just realized the extra newline could be that the entry as an empty text bit. That means, with this, the text property will either be undefined or null. It should probably be normalized to an empty string.

@gsantiago
Copy link
Owner

@jdalton, I see. Thanks for the PR!

@jdalton jdalton deleted the newline branch February 27, 2017 22:29
@jdalton
Copy link
Contributor Author

jdalton commented Feb 27, 2017

Followed up #15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants