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