-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix(srt): reader adds newline to multi-line cues #435
fix(srt): reader adds newline to multi-line cues #435
Conversation
Can you send the problematic file as a zip (to preserve EOLs)? |
Here it is |
src/test/python/test_srt_reader.py
Outdated
doc = to_model(f) | ||
|
||
self.assertIsInstance( | ||
doc.get_body().first_child().first_child().first_child(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest expanding the test to make sure the two lines contain Hello and World.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, updated test.
src/test/python/test_srt_reader.py
Outdated
doc = to_model(f) | ||
|
||
self.assertIsInstance( | ||
doc.get_body().first_child().first_child().first_child(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest expanding the test to make sure there is only line that contains Hello.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, updated test.
Thanks for the catch. The fix looks good. Just two suggestions on the tests. |
8ee6f47
to
67443e2
Compare
I noticed when converting SRT to TTML that multi-line cues had an initial line break (
<br/>
):Input:
Output:
I tried to fix this in this PR, with these changes the output for the same file is:
Closes #436