From 699689c985ee51f213d527663260ff2d4c376d8e Mon Sep 17 00:00:00 2001 From: Herryanto Siatono Date: Thu, 31 Dec 2015 16:01:32 +0800 Subject: [PATCH] add support for jsx attribute expression --- autoload/emmet/lang/html.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index 6416e14..668be4b 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -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