Skip to content

Commit 040d695

Browse files
committed
Fix #90 supports attribute indent when first line of tag dont have attribute
1 parent ab907f3 commit 040d695

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

indent/html.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,12 @@ func! s:InsideTag(foundHtmlString)
921921
else
922922
let idx = match(text, '\s\zs[_a-zA-Z0-9-]\+="')
923923
endif
924+
if idx == -1
925+
let idx = match(text, '<\w\+\(-\w\+\)*')
926+
if idx >= 0
927+
let idx = idx + shiftwidth()
928+
endif
929+
endif
924930
if idx > 0
925931
" Found the attribute. TODO: assumes spaces, no Tabs.
926932
return idx

0 commit comments

Comments
 (0)