This commit is contained in:
Adam Stankiewicz
2020-08-23 17:26:30 +02:00
parent 5d0150e326
commit bc3b36088e
5 changed files with 14 additions and 12 deletions

View File

@@ -843,12 +843,11 @@ func! HtmlIndent_FindTagStart(lnum)
" - a flag indicating whether we found the end of a tag.
" This method is global so that HTML-like indenters can use it.
" To avoid matching " > " or " < " inside a string require that the opening
" "<" is followed by a word character and the closing ">" comes after a
" non-white character.
" "<" is followed by a word character
let idx = match(getline(a:lnum), '\S>\s*$')
if idx > 0
call cursor(a:lnum, idx)
let lnum = searchpair('<\w', '' , '\S>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0]))
let lnum = searchpair('<\w', '' , '>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0]))
if lnum > 0
return [lnum, 1]
endif