handle inner []

closes #412
This commit is contained in:
Yasuhiro Matsumoto
2018-04-25 10:32:16 +09:00
parent c0728a8dac
commit 40c89e5415

View File

@@ -5,7 +5,7 @@ let s:mx = '\([+>]\|[<^]\+\)\{-}\s*'
\ .'\(' \ .'\('
\ .'\%(' \ .'\%('
\ .'\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)' \ .'\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)'
\ .'\|\%(\[\%("[^"]*"\|[^"\]]*\)\+\]\)' \ .'\|\%(\[\[[^\[\]]\+\]\|\%("[^"]*"\|[^"\]]*\)\+\]\)'
\ .'\|\%(\.{[{}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) if len(attributes)
let attr = attributes let attr = attributes
while len(attr) 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 if g:emmet_debug > 1
echomsg 'attr=' . item echomsg 'attr=' . item
endif endif