Fix imageSize

This commit is contained in:
mattn
2013-04-06 22:58:20 +09:00
parent bc5903d69c
commit f08061ec20
3 changed files with 5 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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