From dee767c9980fbfcc6eeca3b25f8ea7c5d436afce Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 1 Jan 2016 00:11:00 +0900 Subject: [PATCH] check type is JSX strictly --- autoload/emmet/lang/html.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index 668be4b..dab0a15 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -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