Permalink
Browse files

Allow newlines after a tag name

Closes #108
  • Loading branch information...
adriaanzon committed May 25, 2018
1 parent 58d8de7 commit 6e90d9ed5acf068bedf4651e32d29caf9f93b8e6
Showing with 13 additions and 1 deletion.
  1. +1 −1 syntax/vue.vim
  2. +12 −0 test/test_syntax.vader
View
@@ -35,7 +35,7 @@ function! s:register_language(language, tag, ...)
unlet! b:current_syntax
execute 'syntax region vue_' . a:language
\ 'keepend'
\ 'start=/<' . a:tag . ' \_[^>]*' . attr . '\_[^>]*>/'
\ 'start=/<' . a:tag . '\>\_[^>]*' . attr . '\_[^>]*>/'
\ 'end="</' . a:tag . '>"me=s-1'
\ 'contains=@' . a:language . ',vueSurroundingTag'
\ 'fold'
View
@@ -101,6 +101,18 @@ Execute:
AssertEqual 'scssVariable', SyntaxOf('$green', 2)
AssertEqual 'vueSurroundingTag', SyntaxAt(1, 1)
Given vue (SCSS region with newline after tag name):
<style
lang="scss"
>
$green: #42b983
</style>
Execute:
AssertEqual 'scssVariable', SyntaxOf('$green')
AssertEqual 'vueSurroundingTag', SyntaxAt(1, 1)
#
# Sass
#

0 comments on commit 6e90d9e

Please sign in to comment.