From 6f4869796c6e30543e55e33f22992495df7caf18 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 26 May 2016 23:45:16 +0900 Subject: [PATCH] fix #332 --- autoload/emmet/lang/html.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index 7db2257..8713a0b 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -1,6 +1,7 @@ +let s:bx = '{\%({[^}]*}\|"[^"]*"\|''[^'']*''\|[^${}]\+\|\$#\|\${\w\+}\|\$\+\)*}' let s:mx = '\([+>]\|[<^]\+\)\{-}\s*' \ .'\((*\)\{-}\s*' -\ .'\([@#.]\{-}[a-zA-Z_\!][a-zA-Z0-9:_\!\-$]*\|{\%([^%$}]\+\|\$#\|\${\w\+}\|\$\+\)*}*[ \t\r\n}]*\|\[[^\]]\+\]\)' +\ .'\([@#.]\{-}[a-zA-Z_\!][a-zA-Z0-9:_\!\-$]*\|' . s:bx . '*[ \t\r\n}]*\|\[[^\]]\+\]\)' \ .'\(' \ .'\%(' \ .'\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)' @@ -8,7 +9,7 @@ let s:mx = '\([+>]\|[<^]\+\)\{-}\s*' \ .'\|\%(\.{[{}a-zA-Z0-9_\-\$]\+\|\.[a-zA-Z0-9_\-\$]\+\)' \ .'\)*' \ .'\)' -\ .'\%(\({\%([^$}]\+\|\$#\|\${\w\+}\|\$\+\)*}\+\)\)\{0,1}' +\ .'\%(\(' . s:bx . '\+\)\)\{0,1}' \ .'\%(\(@-\{0,1}[0-9]*\)\{0,1}\*\([0-9]\+\)\)\{0,1}' \ .'\(\%()\%(\(@-\{0,1}[0-9]*\)\{0,1}\*[0-9]\+\)\{0,1}\)*\)' @@ -144,7 +145,7 @@ function! emmet#lang#html#parseIntoTree(abbr, type) abort let tag_name = pmap[pname] elseif !empty(pname) && index(inlineLevel, pname) > -1 let tag_name = 'span' - elseif len(parent.child) == 0 + elseif len(parent.child) == 0 || len(custom) == 0 let tag_name = 'div' else let tag_name = custom