forked from VimPlug/emmet-vim
fixed bug that '#' was appended with input:text in haml.
This commit is contained in:
@@ -29,9 +29,10 @@ function! zencoding#lang#haml#toString(settings, current, type, inline, filters,
|
|||||||
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
endwhile
|
endwhile
|
||||||
let attr = substitute(attr, '\$$', itemno+1, '')
|
let attr = substitute(attr, '\$$', itemno+1, '')
|
||||||
if attr == 'id'
|
let valtmp = substitute(val, '\${cursor}', '', '')
|
||||||
|
if attr == 'id' && len(valtmp) > 0
|
||||||
let str .= '#' . val
|
let str .= '#' . val
|
||||||
elseif attr == 'class'
|
elseif attr == 'class' && len(valtmp) > 0
|
||||||
let str .= '.' . substitute(val, ' ', '.', 'g')
|
let str .= '.' . substitute(val, ' ', '.', 'g')
|
||||||
else
|
else
|
||||||
if len(tmp) > 0 | let tmp .= ',' | endif
|
if len(tmp) > 0 | let tmp .= ',' | endif
|
||||||
|
|||||||
Reference in New Issue
Block a user