check type is JSX strictly

This commit is contained in:
Yasuhiro Matsumoto
2016-01-01 00:11:00 +09:00
parent 699689c985
commit dee767c998

View File

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