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
Better SplitLongLinesInSubtitle #3370
Conversation
spacing2++; | ||
} | ||
|
||
double duration = p.Duration.TotalMilliseconds / 2.0; |
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 think this is really wrong, we can't assume both line with have same amount of characters... this problem is handle in this PR.
Correct one should be:
d1 = (td / at) * (l1 - nl)
- d1: duration for paragraph one
- td: total duration
- at: all text
- l1: length of firstline
- nl: Environment.NewLine.Length
Cleaner and easy to read/understand
{ | ||
return false; | ||
} | ||
string textNoTags = HtmlUtil.RemoveHtmlTags(text); |
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.
Handles if text ends with any of the supported html tags
It would be really nice if you could add some unit tests :) |
Done ✅ |
No description provided.