-
Notifications
You must be signed in to change notification settings - Fork 110
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
Simple support for WebVTT style #95
Simple support for WebVTT style #95
Conversation
Hi @asticode , I added simple support for WebVTT style, could you please take a look? |
Let me know when I can review your last changes 👍 |
Tests seem to be failing, could you fix them? 🤔 Also could you remove if blockName != webvttBlockNameStyle || webVTTStyles == nil ||
// CSS has ended
len(webVTTStyles.WebVTTStyles) > 0 || webVTTStyles.WebVTTStyles[len(webVTTStyles.WebVTTStyles)-1] == "}" { |
3778f34
to
10ac3ae
Compare
10ac3ae
to
baedc78
Compare
Comments added and |
Thanks for the PR! ❤️ Let me know whether you need a tag 👍 |
Hi all,
Now, we will lose all of WebVTT style after reading it, process somethings and write to WebVTT format again. This PR provide a simple WebVTT style handling, since CSS support many properties, I will not parsing them all, we will just blindly store all the things in
STYLE
and rewrite them when writing WebVTT again. We will love some spaces and new lines, but it's not a big duel. Besides, when mergingsubtitles2
intosubtitles1
, if there are duplicated CSS selectors, only the CSS style ofsubtitles1
will be kept.