Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion after/indent/jsx.vim
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ fu! GetJsxIndent()
endif

" Then correct the indentation of any JSX following '/>' or '>'.
if getline(v:lnum - 1) =~? s:endtag
" Skip empty lines
let i = 1
while ((v:lnum - i) != a:firstline && getline(v:lnum - i) =~? '^\s*$')
let i = i + 1
endwhile

if getline(v:lnum - i) =~? s:endtag
let ind = ind + &sw
endif
else
Expand Down