add support for jsx attribute expression

This commit is contained in:
Herryanto Siatono
2015-12-31 16:01:32 +08:00
committed by Yasuhiro Matsumoto
parent 1ac0fb7011
commit 699689c985

View File

@@ -501,7 +501,11 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
if has_key(an, attr)
let attr = an[attr]
endif
let str .= ' ' . attr . '=' . q . Val . q
if empty(matchstr(Val, '^{.*}$'))
let str .= ' ' . attr . '=' . q . Val . q
else
let str .= ' ' . attr . '=' . Val
endif
if emmet#useFilter(filters, 'c')
if attr ==# 'id' | let comment .= '#' . Val | endif
if attr ==# 'class' | let comment .= '.' . Val | endif