From 40c89e541598873da1428c9861cac957b0474f24 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Wed, 25 Apr 2018 10:32:16 +0900 Subject: [PATCH] handle inner [] closes #412 --- autoload/emmet/lang/html.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index 73a7559..78dc33d 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -5,7 +5,7 @@ let s:mx = '\([+>]\|[<^]\+\)\{-}\s*' \ .'\(' \ .'\%(' \ .'\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)' -\ .'\|\%(\[\%("[^"]*"\|[^"\]]*\)\+\]\)' +\ .'\|\%(\[\[[^\[\]]\+\]\|\%("[^"]*"\|[^"\]]*\)\+\]\)' \ .'\|\%(\.{[{}a-zA-Z0-9_\-\$]\+\|\.[a-zA-Z0-9_\-\$]\+\)' \ .'\)*' \ .'\)' @@ -249,7 +249,7 @@ function! emmet#lang#html#parseIntoTree(abbr, type) abort if len(attributes) let attr = attributes while len(attr) - let item = matchstr(attr, '\(\%(\%(#[{}a-zA-Z0-9_\-\$]\+\)\|\%(\[\%("[^"]*"\|[^"\]]*\)\+\]\)\|\%(\.[{}a-zA-Z0-9_\-\$]\+\)*\)\)') + let item = matchstr(attr, '\(\%(\%(#[{}a-zA-Z0-9_\-\$]\+\)\|\%(\[\%(\[[^\]]*\]\|"[^"]*"\|[^"\[\]]*\)\+\]\)\|\%(\.[{}a-zA-Z0-9_\-\$]\+\)*\)\)') if g:emmet_debug > 1 echomsg 'attr=' . item endif