mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-07 03:04:27 +08:00
<html lang="ja></html> can't toggle comment
This commit is contained in:
@@ -544,7 +544,7 @@ function! emmet#lang#html#toggleComment()
|
|||||||
let tag_name = matchstr(content, '^<\zs/\{0,1}[^ \r\n>]\+')
|
let tag_name = matchstr(content, '^<\zs/\{0,1}[^ \r\n>]\+')
|
||||||
if tag_name[0] == '/'
|
if tag_name[0] == '/'
|
||||||
call setpos('.', [0, pos1[0], pos1[1], 0])
|
call setpos('.', [0, pos1[0], pos1[1], 0])
|
||||||
let pos2 = searchpairpos('<'. tag_name[1:] . '>', '', '</' . tag_name[1:] . '>', 'bnW')
|
let pos2 = searchpairpos('<'. tag_name[1:] . '\>[^>]*>', '', '</' . tag_name[1:] . '>', 'bnW')
|
||||||
let pos1 = searchpos('>', 'cneW')
|
let pos1 = searchpos('>', 'cneW')
|
||||||
let block = [pos2, pos1]
|
let block = [pos2, pos1]
|
||||||
elseif tag_name =~ '/$'
|
elseif tag_name =~ '/$'
|
||||||
@@ -559,7 +559,7 @@ function! emmet#lang#html#toggleComment()
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
call setpos('.', [0, pos2[0], pos2[1], 0])
|
call setpos('.', [0, pos2[0], pos2[1], 0])
|
||||||
let pos3 = searchpairpos('<'. tag_name . '>', '', '</' . tag_name . '>', 'nW')
|
let pos3 = searchpairpos('<'. tag_name . '\>[^>]*>', '', '</' . tag_name . '>', 'nW')
|
||||||
if pos3 == [0, 0]
|
if pos3 == [0, 0]
|
||||||
let block = [pos1, pos2]
|
let block = [pos1, pos2]
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user