File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ let s:empty_tagname = '(area|base|br|col|embed|hr|input|img|keygen|link|meta|par
26
26
let s: empty_tag = ' \v\C\<' .s: empty_tagname .' [^/]*\>'
27
27
let s: empty_tag_start = ' \v\<' .s: empty_tagname .' [^\>]*$'
28
28
let s: empty_tag_end = ' \v^\s*[^\<\>\/]*\>\s*'
29
+ let s: tag_start = ' ^<$'
29
30
let s: tag_end = ' \v^\s*\/?\>\s*'
30
31
let s: oneline_block = ' ^\s*{#.*{/.*}\s*$'
31
32
" }}}
@@ -170,6 +171,9 @@ function! GetSvelteIndent()
170
171
elseif s: SynStyle (cursyn)
171
172
call s: Log (' syntax: style' )
172
173
let ind = GetCSSIndent ()
174
+ elseif s: IsTagStart (curline)
175
+ call s: Log (' syntax: tagstart' )
176
+ let ind = 0
173
177
else
174
178
call s: Log (' syntax: javascript' )
175
179
if len (b: javascript_indentexpr )
@@ -199,6 +203,10 @@ function! GetSvelteIndent()
199
203
return ind
200
204
endfunction
201
205
206
+ function ! s: IsTagStart (curline)
207
+ return a: curline = ~ s: tag_start
208
+ endfunction
209
+
202
210
function ! s: IsBlockStart (prevsyns)
203
211
let prevsyn_second = get (a: prevsyns , 1 , ' ' )
204
212
" Some HTML tags add an extra syntax layer
You can’t perform that action at this time.
0 commit comments