mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-08 11:34:46 +08:00
Fix imageSize
This commit is contained in:
@@ -128,7 +128,9 @@ function! zencoding#lang#haml#imageSize()
|
|||||||
endif
|
endif
|
||||||
let current.attr.width = width
|
let current.attr.width = width
|
||||||
let current.attr.height = height
|
let current.attr.height = height
|
||||||
|
let current.attrs_order += ['width', 'height']
|
||||||
let haml = zencoding#toString(current, 'haml', 1)
|
let haml = zencoding#toString(current, 'haml', 1)
|
||||||
|
let haml = substitute(haml, '\${cursor}', '', '')
|
||||||
call setline('.', substitute(matchstr(line, '^\s*') . haml, "\n", "", "g"))
|
call setline('.', substitute(matchstr(line, '^\s*') . haml, "\n", "", "g"))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -421,6 +421,7 @@ function! zencoding#lang#html#imageSize()
|
|||||||
let current.attr.height = height
|
let current.attr.height = height
|
||||||
let current.attrs_order += ['width', 'height']
|
let current.attrs_order += ['width', 'height']
|
||||||
let html = substitute(zencoding#toString(current, 'html', 1), '\n', '', '')
|
let html = substitute(zencoding#toString(current, 'html', 1), '\n', '', '')
|
||||||
|
let html = substitute(html, '\${cursor}', '', '')
|
||||||
call zencoding#util#setContent(img_region, html)
|
call zencoding#util#setContent(img_region, html)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,9 @@ function! zencoding#lang#slim#imageSize()
|
|||||||
endif
|
endif
|
||||||
let current.attr.width = width
|
let current.attr.width = width
|
||||||
let current.attr.height = height
|
let current.attr.height = height
|
||||||
|
let current.attrs_order += ['width', 'height']
|
||||||
let slim = zencoding#toString(current, 'slim', 1)
|
let slim = zencoding#toString(current, 'slim', 1)
|
||||||
|
let slim = substitute(slim, '\${cursor}', '', '')
|
||||||
call setline('.', substitute(matchstr(line, '^\s*') . slim, "\n", "", "g"))
|
call setline('.', substitute(matchstr(line, '^\s*') . slim, "\n", "", "g"))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user