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)
let attr = an[attr]
endif
if empty(matchstr(Val, '^{.*}$'))
let str .= ' ' . attr . '=' . q . Val . q
else
if type == 'jsx' && Val =~ '^{.*}$'
let str .= ' ' . attr . '=' . Val
else
let str .= ' ' . attr . '=' . q . Val . q
endif
if emmet#useFilter(filters, 'c')
if attr ==# 'id' | let comment .= '#' . Val | endif