From 289619aa56d631b8f289c43579bf908d12a03c29 Mon Sep 17 00:00:00 2001 From: Kyo Nagashima Date: Tue, 17 Oct 2017 18:53:00 +0900 Subject: [PATCH] Add webvtt1.vim This syntax file is for WebVTT: The Web Video Text Tracks Format. This resolves part of #55. `:past` and `:future` is not support, because they are used only in parentheses of `cue()`, and current CSS syntax does not support a highlighting in parentheses of pseudo functions. --- after/syntax/css/webvtt1.vim | 2 ++ after/syntax/html.vim | 1 + test/test.css | 7 +++++++ test/test.html | 8 ++++++++ 4 files changed, 18 insertions(+) create mode 100644 after/syntax/css/webvtt1.vim diff --git a/after/syntax/css/webvtt1.vim b/after/syntax/css/webvtt1.vim new file mode 100644 index 0000000..e27a0d7 --- /dev/null +++ b/after/syntax/css/webvtt1.vim @@ -0,0 +1,2 @@ +syn match cssPseudoClassId contained "::\" +syn region cssPseudoClassLang matchgroup=cssPseudoClassId start="::cue\(-region\)\=(" end=")" oneline diff --git a/after/syntax/html.vim b/after/syntax/html.vim index 6b428a1..1155f93 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -76,4 +76,5 @@ syn include @htmlCss syntax/css/selectors.vim syn include @htmlCss syntax/css/selectors4.vim syn include @htmlCss syntax/css/svg2.vim syn include @htmlCss syntax/css/web-animations-1.vim +syn include @htmlCss syntax/css/webvtt1.vim syn include @htmlCss syntax/css/worklets-1.vim diff --git a/test/test.css b/test/test.css index f9055c0..e409a0d 100644 --- a/test/test.css +++ b/test/test.css @@ -871,6 +871,13 @@ display: auto; } +.webvtt1::cue, +.webvtt1::cue-region, +.webvtt1::cue(#cue1), +.webvtt1::cue-region(#scroll), { + display: auto; +} + .will-change-1 { will-change: scroll-position; } diff --git a/test/test.html b/test/test.html index 05c4582..816ce89 100644 --- a/test/test.html +++ b/test/test.html @@ -951,6 +951,14 @@ } +