forked from VimPlug/emmet-vim
check type is JSX strictly
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user