forked from VimPlug/emmet-vim
expand .content to class="content"
This commit is contained in:
@@ -63,9 +63,9 @@ function! s:zen_parseIntoTree(abbr, type)
|
|||||||
|
|
||||||
if s:zen_isExtends(type, "html")
|
if s:zen_isExtends(type, "html")
|
||||||
let abbr = substitute(abbr, '\([a-zA-Z][a-zA-Z0-9]*\)+\([()]\|$\)', '\="(".s:zen_getExpandos(type, submatch(1)).")".submatch(2)', 'i')
|
let abbr = substitute(abbr, '\([a-zA-Z][a-zA-Z0-9]*\)+\([()]\|$\)', '\="(".s:zen_getExpandos(type, submatch(1)).")".submatch(2)', 'i')
|
||||||
let mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#]\{-}[a-zA-Z\!][a-zA-Z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.{[{}a-zA-Z0-9_\-\$]\+\|\.[a-zA-Z0-9_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\s*\*\s*\([0-9]\+\)\s*\)\{0,1}\(\%(\s*)\%(\s*\*\s*[0-9]\+\s*\)\{0,1}\)*\)'
|
let mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#.]\{-}[a-zA-Z\!][a-zA-Z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.{[{}a-zA-Z0-9_\-\$]\+\|\.[a-zA-Z0-9_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\s*\*\s*\([0-9]\+\)\s*\)\{0,1}\(\%(\s*)\%(\s*\*\s*[0-9]\+\s*\)\{0,1}\)*\)'
|
||||||
else
|
else
|
||||||
let mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#]\{-}[a-zA-Z\!][a-zA-Z0-9:\!\+\-]*\|{[^}]\+}\)\(\%(\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.{[{}a-zA-Z0-9_\-\$]\+\|\.[a-zA-Z0-9_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\s*\*\s*\([0-9]\+\)\s*\)\{0,1}\(\%(\s*)\%(\s*\*\s*[0-9]\+\s*\)\{0,1}\)*\)'
|
let mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#.]\{-}[a-zA-Z\!][a-zA-Z0-9:\!\+\-]*\|{[^}]\+}\)\(\%(\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.{[{}a-zA-Z0-9_\-\$]\+\|\.[a-zA-Z0-9_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\s*\*\s*\([0-9]\+\)\s*\)\{0,1}\(\%(\s*)\%(\s*\*\s*[0-9]\+\s*\)\{0,1}\)*\)'
|
||||||
endif
|
endif
|
||||||
let root = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'pos': 0 }
|
let root = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'pos': 0 }
|
||||||
let parent = root
|
let parent = root
|
||||||
@@ -89,6 +89,10 @@ function! s:zen_parseIntoTree(abbr, type)
|
|||||||
let attributes = tag_name . attributes
|
let attributes = tag_name . attributes
|
||||||
let tag_name = 'div'
|
let tag_name = 'div'
|
||||||
endif
|
endif
|
||||||
|
if tag_name =~ '^\.'
|
||||||
|
let attributes = tag_name . attributes
|
||||||
|
let tag_name = 'div'
|
||||||
|
endif
|
||||||
if multiplier <= 0 | let multiplier = 1 | endif
|
if multiplier <= 0 | let multiplier = 1 | endif
|
||||||
|
|
||||||
" make default node
|
" make default node
|
||||||
@@ -680,9 +684,6 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
else
|
else
|
||||||
let part = matchstr(line, '\(\S.*\)$')
|
let part = matchstr(line, '\(\S.*\)$')
|
||||||
endif
|
endif
|
||||||
if part =~ '!'
|
|
||||||
let part = substitute(part, '.*!', '!', '')
|
|
||||||
endif
|
|
||||||
let rest = getline('.')[len(line):]
|
let rest = getline('.')[len(line):]
|
||||||
let str = part
|
let str = part
|
||||||
let mx = '|\(\%(html\|haml\|e\|c\|fc\|xsl\)\s*,\{0,1}\s*\)*$'
|
let mx = '|\(\%(html\|haml\|e\|c\|fc\|xsl\)\s*,\{0,1}\s*\)*$'
|
||||||
|
|||||||
Reference in New Issue
Block a user