check empty.

This commit is contained in:
mattn
2012-06-29 09:19:46 +09:00
parent e1e79f3d25
commit 61a261ef89
3 changed files with 9 additions and 3 deletions

View File

@@ -99,7 +99,9 @@ function! zencoding#lang#haml#imageSize()
return
endif
let fn = current.attr.src
if fn !~ '^\(/\|http\)'
if fn =~ '^\s*$'
return
elseif fn !~ '^\(/\|http\)'
let fn = simplify(expand('%:h') . '/' . fn)
endif

View File

@@ -387,7 +387,9 @@ function! zencoding#lang#html#imageSize()
return
endif
let fn = current.attr.src
if fn !~ '^\(/\|http\)'
if fn =~ '^\s*$'
return
elseif fn !~ '^\(/\|http\)'
let fn = simplify(expand('%:h') . '/' . fn)
endif

View File

@@ -78,7 +78,9 @@ function! zencoding#lang#slim#imageSize()
return
endif
let fn = current.attr.src
if fn !~ '^\(/\|http\)'
if fn =~ '^\s*$'
return
elseif fn !~ '^\(/\|http\)'
let fn = simplify(expand('%:h') . '/' . fn)
endif