mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-09 03:54:47 +08:00
enable white space before tag name.
This commit is contained in:
@@ -798,7 +798,7 @@ function! s:zen_parseIntoTree(abbr, type)
|
|||||||
" TODO : expandos
|
" TODO : expandos
|
||||||
let abbr = substitute(abbr, '\([a-z][a-z0-9]*\)\+$', '\=s:zen_expandos(submatch(1), type)', 'i')
|
let abbr = substitute(abbr, '\([a-z][a-z0-9]*\)\+$', '\=s:zen_expandos(submatch(1), type)', 'i')
|
||||||
|
|
||||||
let mx = '\([\+>#]\|<\+\)\{-}\(@\{-}[a-z][a-z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#[0-9A-Za-z_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.[0-9A-Za-z_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\*\([0-9]\+\)\)\{0,1}'
|
let mx = '\([\+>#]\|<\+\)\{-}\s*\(@\{-}[a-z][a-z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#[0-9A-Za-z_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.[0-9A-Za-z_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\*\([0-9]\+\)\)\{0,1}'
|
||||||
let last = {}
|
let last = {}
|
||||||
let parent = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'brother': 0 }
|
let parent = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'brother': 0 }
|
||||||
let granma = parent
|
let granma = parent
|
||||||
@@ -894,7 +894,7 @@ function! s:zen_parseIntoTree(abbr, type)
|
|||||||
endif
|
endif
|
||||||
call add(parent['child'], current)
|
call add(parent['child'], current)
|
||||||
let last = current
|
let last = current
|
||||||
if 1
|
if 0
|
||||||
echo "str=".str
|
echo "str=".str
|
||||||
echo "tag_name=".tag_name
|
echo "tag_name=".tag_name
|
||||||
echo "operator=".operator
|
echo "operator=".operator
|
||||||
@@ -909,6 +909,7 @@ function! s:zen_parseIntoTree(abbr, type)
|
|||||||
"if len(tag_name) == 0 && len(value) == 0
|
"if len(tag_name) == 0 && len(value) == 0
|
||||||
" break
|
" break
|
||||||
"endif
|
"endif
|
||||||
|
"let abbr = substitute(abbr[stridx(abbr, match) + len(match):], '^\s*', '', '')
|
||||||
let abbr = abbr[stridx(abbr, match) + len(match):]
|
let abbr = abbr[stridx(abbr, match) + len(match):]
|
||||||
endwhile
|
endwhile
|
||||||
return root
|
return root
|
||||||
@@ -1081,5 +1082,6 @@ endif
|
|||||||
"echo ZenExpand('table>tr>td.name#foo+td*3', '')
|
"echo ZenExpand('table>tr>td.name#foo+td*3', '')
|
||||||
"echo ZenExpand('div#header + div#footer', '')
|
"echo ZenExpand('div#header + div#footer', '')
|
||||||
"echo ZenExpand('#header + div#footer', '')
|
"echo ZenExpand('#header + div#footer', '')
|
||||||
|
"echo ZenExpand('#header > ul > li < p{Footer}', '')
|
||||||
|
|
||||||
" vim:set et:
|
" vim:set et:
|
||||||
|
|||||||
Reference in New Issue
Block a user