mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-06 18:54:27 +08:00
Get image paths that is relative location from the current buffer. Related issue #150
This commit is contained in:
@@ -120,10 +120,7 @@ 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
|
||||
let fn = simplify(expand('%:h') . '/' . fn)
|
||||
endif
|
||||
|
||||
let [width, height] = emmet#util#getImageSize(fn)
|
||||
|
||||
@@ -447,10 +447,7 @@ 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
|
||||
let fn = simplify(expand('%:h') . '/' . fn)
|
||||
endif
|
||||
|
||||
let [width, height] = emmet#util#getImageSize(fn)
|
||||
|
||||
@@ -98,10 +98,7 @@ 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
|
||||
let fn = simplify(expand('%:h') . '/' . fn)
|
||||
endif
|
||||
|
||||
let [width, height] = emmet#util#getImageSize(fn)
|
||||
|
||||
Reference in New Issue
Block a user