forked from VimPlug/emmet-vim
fix cursor placing for haml & slim. close #92
This commit is contained in:
@@ -68,6 +68,8 @@ function! zencoding#lang#haml#toString(settings, current, type, inline, filters,
|
|||||||
let str .= "\n" . indent . line . " |"
|
let str .= "\n" . indent . line . " |"
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
elseif len(current.child) == 0
|
||||||
|
let str .= '${cursor}'
|
||||||
endif
|
endif
|
||||||
if len(current.child) == 1 && len(current.child[0].name) == 0
|
if len(current.child) == 1 && len(current.child[0].name) == 0
|
||||||
let text = current.child[0].value[1:-2]
|
let text = current.child[0].value[1:-2]
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
|
|||||||
for line in split(text, "\n")
|
for line in split(text, "\n")
|
||||||
let str .= indent . "| " . line . "\n"
|
let str .= indent . "| " . line . "\n"
|
||||||
endfor
|
endfor
|
||||||
|
elseif len(current.child) == 0
|
||||||
|
let str .= '${cursor}'
|
||||||
endif
|
endif
|
||||||
if len(current.child) == 1 && len(current.child[0].name) == 0
|
if len(current.child) == 1 && len(current.child[0].name) == 0
|
||||||
let str .= "\n"
|
let str .= "\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user