Fix unit expanding

This commit is contained in:
Yasuhiro Matsumoto
2019-06-18 03:22:31 +09:00
parent 192d22fe69
commit 47c28892d9

View File

@@ -39,10 +39,15 @@ function! emmet#lang#css#parseIntoTree(abbr, type) abort
let token = token[1:] let token = token[1:]
endif endif
let value = '' let value = ''
for v in split(prop[2], '\a\+\zs') for vt in split(prop[2], '\a\+\zs')
let ut = matchstr(vt, '[a-z]\+$')
for v in split(vt, '\d\zs-')
if len(value) > 0 if len(value) > 0
let value .= ' ' let value .= ' '
endif endif
if v !~ '[a-z]\+$'
let v .= ut
endif
if token =~# '^[z]' if token =~# '^[z]'
" TODO " TODO
let value .= substitute(v, '[^0-9.]*$', '', '') let value .= substitute(v, '[^0-9.]*$', '', '')
@@ -74,6 +79,7 @@ function! emmet#lang#css#parseIntoTree(abbr, type) abort
let value .= v . 'px' let value .= v . 'px'
endif endif
endfor endfor
endfor
endif endif
let tag_name = token let tag_name = token