mirror of
https://github.com/posva/vim-vue.git
synced 2025-12-08 10:24:45 +08:00
Remove attrs limitation on style tag (#53)
* Remove attrs limitation on style tag Closes #52 Style tags can actually have any amount of extra tags, so adding the scoped tags is just too limiting. * Improve attribute patterns
This commit is contained in:
committed by
Adriaan Zonnenberg
parent
c122cb8c29
commit
f75a55ef19
@@ -59,30 +59,30 @@ endif
|
||||
|
||||
syntax include @CSS syntax/css.vim
|
||||
unlet! b:current_syntax
|
||||
syntax region css keepend start=/<style\( \+scoped\)\?>/ end="</style>" contains=@CSS fold
|
||||
syntax region css keepend start=/<style\_[^>]*>/ end="</style>" contains=@CSS fold
|
||||
|
||||
if s:syntaxes.stylus
|
||||
syntax include @stylus syntax/stylus.vim
|
||||
unlet! b:current_syntax
|
||||
syntax region stylus keepend start=/<style lang=\("\|'\)[^\1]*stylus[^\1]*\1\( \+scoped\)\?>/ end="</style>" contains=@stylus fold
|
||||
syntax region stylus keepend start=/<style \_[^>]*lang=\("\|'\)[^\1]*stylus[^\1]*\1\_[^>]*>/ end="</style>" contains=@stylus fold
|
||||
endif
|
||||
|
||||
if s:syntaxes.sass
|
||||
syntax include @sass syntax/sass.vim
|
||||
unlet! b:current_syntax
|
||||
syntax region sass keepend start=/<style\( \+scoped\)\? lang=\("\|'\)[^\1]*sass[^\1]*\1\( \+scoped\)\?>/ end="</style>" contains=@sass fold
|
||||
syntax region sass keepend start=/<style \_[^>]*lang=\("\|'\)[^\1]*sass[^\1]*\1\_[^>]*>/ end="</style>" contains=@sass fold
|
||||
endif
|
||||
|
||||
if s:syntaxes.scss
|
||||
syntax include @scss syntax/scss.vim
|
||||
unlet! b:current_syntax
|
||||
syntax region scss keepend start=/<style\( \+scoped\)\? lang=\("\|'\)[^\1]*scss[^\1]*\1\( \+scoped\)\?>/ end="</style>" contains=@scss fold
|
||||
syntax region scss keepend start=/<style \_[^>]*lang=\("\|'\)[^\1]*scss[^\1]*\1\_[^>]*>/ end="</style>" contains=@scss fold
|
||||
endif
|
||||
|
||||
if s:syntaxes.less
|
||||
syntax include @less syntax/less.vim
|
||||
unlet! b:current_syntax
|
||||
syntax region less keepend matchgroup=PreProc start=/<style\%( \+scoped\)\? lang=\("\|'\)[^\1]*less[^\1]*\1\%( \+scoped\)\?>/ end="</style>" contains=@less fold
|
||||
syntax region less keepend matchgroup=PreProc start=/<style \_[^>]*lang=\("\|'\)[^\1]*less[^\1]*\1\_[^>]*>/ end="</style>" contains=@less fold
|
||||
endif
|
||||
|
||||
let b:current_syntax = "vue"
|
||||
|
||||
Reference in New Issue
Block a user