mirror of
https://github.com/mattn/emmet-vim.git
synced 2026-11-06 18:25:56 +08:00
Get image paths that is relative location from the current buffer. Related issue #150
This commit is contained in:
1 parent
9475526c1f
commit
9c17334509
3 files changed
-9
No files matched your search
@@ -120,11 +120,8 @@ function! emmet#lang#haml#imageSize()
|
||||
if fn =~ '^\s*$'
|
||||
return
|
||||
elseif fn !~ '^\(/\|http\)'
|
||||
let fn = resolve(expand(fn))
|
||||
if !filereadable(fn)
|
||||
let fn = simplify(expand('%:h') . '/' . fn)
|
||||
endif
|
||||
endif
|
||||
|
||||
let [width, height] = emmet#util#getImageSize(fn)
|
||||
if width == -1 && height == -1
|
||||
|
||||
@@ -447,11 +447,8 @@ function! emmet#lang#html#imageSize()
|
||||
if fn =~ '^\s*$'
|
||||
return
|
||||
elseif fn !~ '^\(/\|http\)'
|
||||
let fn = resolve(expand(fn))
|
||||
if !filereadable(fn)
|
||||
let fn = simplify(expand('%:h') . '/' . fn)
|
||||
endif
|
||||
endif
|
||||
|
||||
let [width, height] = emmet#util#getImageSize(fn)
|
||||
if width == -1 && height == -1
|
||||
|
||||
@@ -98,11 +98,8 @@ function! emmet#lang#slim#imageSize()
|
||||
if fn =~ '^\s*$'
|
||||
return
|
||||
elseif fn !~ '^\(/\|http\)'
|
||||
let fn = resolve(expand(fn))
|
||||
if !filereadable(fn)
|
||||
let fn = simplify(expand('%:h') . '/' . fn)
|
||||
endif
|
||||
endif
|
||||
|
||||
let [width, height] = emmet#util#getImageSize(fn)
|
||||
if width == -1 && height == -1
|
||||
|
||||
Reference in new issue
Block a user