forked from VimPlug/emmet-vim
fix bem filter
This commit is contained in:
@@ -514,7 +514,6 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
|
|||||||
if len(Val) > 0
|
if len(Val) > 0
|
||||||
let Val .= ' '
|
let Val .= ' '
|
||||||
endif
|
endif
|
||||||
if _val =~# '_'
|
|
||||||
if _val =~# '^_'
|
if _val =~# '^_'
|
||||||
if has_key(current.parent.attr, 'class')
|
if has_key(current.parent.attr, 'class')
|
||||||
let lead = current.parent.attr["class"]
|
let lead = current.parent.attr["class"]
|
||||||
@@ -524,21 +523,24 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
|
|||||||
let Val .= lead . ' ' . lead . _val
|
let Val .= lead . ' ' . lead . _val
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let b = split(vals[0], '_')[0]
|
let lead = split(vals[0], '_')[0]
|
||||||
let Val .= lead . _val
|
let Val .= lead . _val
|
||||||
endif
|
endif
|
||||||
else
|
|
||||||
let lead = split(vals[0], '_')[0]
|
|
||||||
let Val .= lead . ' ' . _val
|
|
||||||
endif
|
|
||||||
elseif _val =~# '^-'
|
elseif _val =~# '^-'
|
||||||
|
for l in split(_val, '_')
|
||||||
|
if len(Val) > 0
|
||||||
|
let Val .= ' '
|
||||||
|
endif
|
||||||
|
let l = substitute(l, '^-', '__', '')
|
||||||
if len(lead) == 0
|
if len(lead) == 0
|
||||||
let pattr = current.parent.attr
|
let pattr = current.parent.attr
|
||||||
if has_key(pattr, 'class')
|
if has_key(pattr, 'class')
|
||||||
let lead = split(pattr['class'], '\s\+')[0]
|
let lead = split(pattr['class'], '\s\+')[0]
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
let Val .= lead . _val
|
let Val .= lead . l
|
||||||
|
let lead .= l . '_'
|
||||||
|
endfor
|
||||||
else
|
else
|
||||||
let Val .= _val
|
let Val .= _val
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ finish
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
'query': "form.search-form._wide>input.-query-string+input:s.-btn_large|bem",
|
'query': "form.search-form._wide>input.-query-string+input:s.-btn_large|bem",
|
||||||
'result': "<form class=\"search-form search-form_wide\" action=\"\">\n\t<input class=\"search-form-query-string\" type=\"\">\n\t<input class=\"search-form-btn_large\" type=\"submit\" value=\"\">\n</form>\n",
|
'result': "<form class=\"search-form search-form_wide\" action=\"\">\n\t<input class=\"search-form__query-string\" type=\"\">\n\t<input class=\"search-form__btn search-form__btn_large\" type=\"submit\" value=\"\">\n</form>\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'query': "form>fieldset>legend+(label>input[type=\"checkbox\"])*3",
|
'query': "form>fieldset>legend+(label>input[type=\"checkbox\"])*3",
|
||||||
|
|||||||
Reference in New Issue
Block a user