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

VTT writer: port SRT writer improvments (#343) #349

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

xchange11
Copy link
Collaborator

Closes #343

@xchange11 xchange11 requested a review from palemieux October 19, 2021 09:29
def normalize_eol(self):
"""Remove line breaks at the beginning and end of the paragraph, and replace
line break sequences with a single line break"""
self._text = VttParagraph._EOL_SEQ_RE.sub("\n", self._text).strip("\n\r")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about also normalizing whitespaces per #350?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@palemieux I think #350 is not critical as xml:preserve is not used (at least from observation) very often, if at all. It is also not recommended to use it because the result can not be predicted and depends on the selection of fonts. So I think it is safe to wait with this issue and prioritize other issues higher. If the review is OK for this PR it is ready to be merged from my view.

@palemieux palemieux merged commit 40a4c38 into master Nov 8, 2021
@palemieux palemieux deleted the issues/0343-port-srt-writer-changes-vtt branch December 2, 2021 16:30
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.

Port SRT writer improvements to WebVTT writer
2 participants