forked from VimPlug/emmet-vim
Attempt at fixing the Javascript identifier pattern
Running tests locally seems OK!
This commit is contained in:
@@ -383,7 +383,7 @@ function! emmet#getFileType(...) abort
|
||||
let type = 'css'
|
||||
elseif type =~# '^html\w'
|
||||
let type = 'html'
|
||||
elseif type =~# '^javaScript'
|
||||
elseif type =~# '^js\w'
|
||||
let type = 'javascript'
|
||||
elseif type =~# '^xml'
|
||||
let type = 'xml'
|
||||
@@ -409,10 +409,9 @@ function! emmet#getFileType(...) abort
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if len(type) ==# 0 | let type = 'html' | endif
|
||||
endif
|
||||
|
||||
return type
|
||||
return len(type) == 0 ? 'html' : type
|
||||
endfunction
|
||||
|
||||
function! emmet#getDollarExprs(expand) abort
|
||||
|
||||
517
test.log
Normal file
517
test.log
Normal file
@@ -0,0 +1,517 @@
|
||||
[html][expand abbreviation]testing #001
|
||||
: div ...
|
||||
ok
|
||||
testing #002
|
||||
: div#wrapper ...
|
||||
ok
|
||||
testing #003
|
||||
: div.box ...
|
||||
ok
|
||||
testing #004
|
||||
: a[title=TITLE] ...
|
||||
ok
|
||||
testing #005
|
||||
: div#wrapper.box ...
|
||||
ok
|
||||
testing #006
|
||||
: div#wrapper.box.current ...
|
||||
ok
|
||||
testing #007
|
||||
: div#wrapper.box.current[title=TITLE rel] ...
|
||||
ok
|
||||
testing #008
|
||||
: div#main+div#sub ...
|
||||
ok
|
||||
testing #009
|
||||
: div#main>div#sub ...
|
||||
ok
|
||||
testing #010
|
||||
: html:xt>div#header>div#logo+ul#nav>li.item-$*5>a ...
|
||||
ok
|
||||
testing #011
|
||||
: ol>li*2 ...
|
||||
ok
|
||||
testing #012
|
||||
: a ...
|
||||
ok
|
||||
testing #013
|
||||
: obj ...
|
||||
ok
|
||||
testing #014
|
||||
: cc:ie6>p+blockquote#sample$.so.many.classes*2 ...
|
||||
ok
|
||||
testing #015
|
||||
: html:4t>div#wrapper>div#header+div#contents+div#footer ...
|
||||
ok
|
||||
testing #016
|
||||
: a[href=http://www.google.com/].foo#hoge ...
|
||||
ok
|
||||
testing #017
|
||||
: a[href=http://www.google.com/]{Google} ...
|
||||
ok
|
||||
testing #018
|
||||
: {Emmet} ...
|
||||
ok
|
||||
testing #019
|
||||
: a+b ...
|
||||
ok
|
||||
testing #020
|
||||
: a>b>i<b ...
|
||||
ok
|
||||
testing #021
|
||||
: a>b>i^b ...
|
||||
ok
|
||||
testing #022
|
||||
: a>b>i<<b ...
|
||||
ok
|
||||
testing #023
|
||||
: a>b>i^^b ...
|
||||
ok
|
||||
testing #024
|
||||
: blockquote>b>i<<b ...
|
||||
ok
|
||||
testing #025
|
||||
: blockquote>b>i^^b ...
|
||||
ok
|
||||
testing #026
|
||||
: a[href=foo][class=bar] ...
|
||||
ok
|
||||
testing #027
|
||||
: a[a=b][b=c=d][e]{foo}*2 ...
|
||||
ok
|
||||
testing #028
|
||||
: a[a=b][b=c=d][e]*2{foo} ...
|
||||
ok
|
||||
testing #029
|
||||
: a*2{foo}a ...
|
||||
ok
|
||||
testing #030
|
||||
: a{foo}*2>b ...
|
||||
ok
|
||||
testing #031
|
||||
: a*2{foo}>b ...
|
||||
ok
|
||||
testing #032
|
||||
: table>tr>td.name#foo+td*3 ...
|
||||
ok
|
||||
testing #033
|
||||
: div#header+div#footer ...
|
||||
ok
|
||||
testing #034
|
||||
: #header+div#footer ...
|
||||
ok
|
||||
testing #035
|
||||
: #header>ul>li<p{Footer} ...
|
||||
ok
|
||||
testing #036
|
||||
: #header>ul>li^p{Footer} ...
|
||||
ok
|
||||
testing #037
|
||||
: a#foo$$$*3 ...
|
||||
ok
|
||||
testing #038
|
||||
: ul+ ...
|
||||
ok
|
||||
testing #039
|
||||
: table+ ...
|
||||
ok
|
||||
testing #040
|
||||
: #header>li<#content ...
|
||||
ok
|
||||
testing #041
|
||||
: #header>li^#content ...
|
||||
ok
|
||||
testing #042
|
||||
: (#header>li)<#content ...
|
||||
ok
|
||||
testing #043
|
||||
: (#header>li)^#content ...
|
||||
ok
|
||||
testing #044
|
||||
: a>b>i<<div ...
|
||||
ok
|
||||
testing #045
|
||||
: a>b>i^^div ...
|
||||
ok
|
||||
testing #046
|
||||
: (#header>h1)+#content+#footer ...
|
||||
ok
|
||||
testing #047
|
||||
: (#header>h1)+(#content>(#main>h2+div#entry$.section*5>(h3>a)+div>p*3+ul+)+(#utilities))+(#footer>address) ...
|
||||
ok
|
||||
testing #048
|
||||
: (div>(ul*2)*2)+(#utilities) ...
|
||||
ok
|
||||
testing #049
|
||||
: table>(tr>td*3)*4 ...
|
||||
ok
|
||||
testing #050
|
||||
: (((a#foo+a#bar)*2)*3) ...
|
||||
ok
|
||||
testing #051
|
||||
: div#box$*3>h3+p*2 ...
|
||||
ok
|
||||
testing #052
|
||||
: div#box.foo$$$.bar$$$*3 ...
|
||||
ok
|
||||
testing #053
|
||||
: div#box$*3>h3+p.bar*2|e ...
|
||||
ok
|
||||
testing #054
|
||||
: div>div#page>p.title+p|c ...
|
||||
ok
|
||||
testing #055
|
||||
: kbd*2|s ...
|
||||
ok
|
||||
testing #056
|
||||
: link:css ...
|
||||
ok
|
||||
testing #057
|
||||
: a[title="Hello', world" rel] ...
|
||||
ok
|
||||
testing #058
|
||||
: div>a#foo{bar} ...
|
||||
ok
|
||||
testing #059
|
||||
: .content{Hello!} ...
|
||||
ok
|
||||
testing #060
|
||||
: div.logo+(div#navigation)+(div#links) ...
|
||||
ok
|
||||
testing #061
|
||||
: h1{header}+{Text}+a[href=http://link.org]{linktext}+{again some text}+a[href=http://anoterlink.org]{click me!}+{some final text} ...
|
||||
ok
|
||||
testing #062
|
||||
: a{&}+div{&&} ...
|
||||
ok
|
||||
testing #063
|
||||
: <foo/>span$$$$ ...
|
||||
ok
|
||||
testing #064
|
||||
: foo span$$$$ ...
|
||||
ok
|
||||
testing #065
|
||||
: foo span$$$$ bar ...
|
||||
ok
|
||||
testing #066
|
||||
: foo $$$$bar baz ...
|
||||
ok
|
||||
testing #067
|
||||
: foo $$$$bar baz ...
|
||||
ok
|
||||
testing #068
|
||||
: f div.boxes>article.box2>header>(hgroup>h2{aaa}+h3{bbb})+p{ccc}$$$$ ...
|
||||
ok
|
||||
testing #069
|
||||
: div.boxes>(div.box2>section>h2{a}+p{b})+(div.box1>section>h2{c}+p{d}+p{e}+(bq>h2{f}+h3{g})+p{h}) ...
|
||||
ok
|
||||
testing #070
|
||||
: (div>(label+input))+div ...
|
||||
ok
|
||||
testing #071
|
||||
: test1\ntest2\ntest3$$$$ ...
|
||||
ok
|
||||
testing #072
|
||||
: test1\ntest2\ntest3$$$$ ...
|
||||
ok
|
||||
testing #073
|
||||
: test1\ntest2\ntest3$$$$ ...
|
||||
ok
|
||||
testing #074
|
||||
: div#id-$*5>div#id2-$ ...
|
||||
ok
|
||||
testing #075
|
||||
: .foo>[bar=2]>.baz ...
|
||||
ok
|
||||
testing #076
|
||||
: {test case $ }*3 ...
|
||||
ok
|
||||
testing #077
|
||||
: {test case $${nr}}*3 ...
|
||||
ok
|
||||
testing #078
|
||||
: {test case \$ }*3 ...
|
||||
ok
|
||||
testing #079
|
||||
: {test case $$$ }*3 ...
|
||||
ok
|
||||
testing #080
|
||||
: a[title=$#]{foo} ...
|
||||
ok
|
||||
testing #081
|
||||
: span.item$*2>{item $} ...
|
||||
ok
|
||||
testing #082
|
||||
: \t<div class="footer_nav">\n\t\t<a href="#">nav link</a>\n\t</div>$$$$ ...
|
||||
ok
|
||||
testing #083
|
||||
: <small>a$$$$</small> ...
|
||||
ok
|
||||
testing #084
|
||||
: form.search-form._wide>input.-query-string+input:s.-btn_large|bem ...
|
||||
ok
|
||||
testing #085
|
||||
: form>fieldset>legend+(label>input[type="checkbox"])*3 ...
|
||||
ok
|
||||
pass 13.924448[split join tag]testing #001
|
||||
: <div>\n\t<span>$$$$</span>\n</div> ...
|
||||
ok
|
||||
testing #002
|
||||
: <div>\n\t<span$$$$/>\n</div> ...
|
||||
ok
|
||||
testing #003
|
||||
: <div onclick="javascript:console.log(Date.now() % 1000 > 500)">test$$$$/>\n</div> ...
|
||||
ok
|
||||
testing #004
|
||||
: <div>\n\t<some-tag$$$$/>\n</div> ...
|
||||
ok
|
||||
pass 0.710855[toggle comment]testing #001
|
||||
: <div>\n\t<span>$$$$</span>\n</div> ...
|
||||
ok
|
||||
testing #002
|
||||
: <div>\n\t<!-- <span>$$$$</span> -->\n</div> ...
|
||||
ok
|
||||
pass 0.355618[image size]testing #001
|
||||
: img[src=http://mattn.kaoriya.net/images/logo.png]$$$$ ...
|
||||
ok
|
||||
testing #002
|
||||
: img[src=/logo.png]$$$$ ...
|
||||
ok
|
||||
testing #003
|
||||
: img[src=http://mattn.kaoriya.net/images/logo.png width=foo height=bar]$$$$ ...
|
||||
ok
|
||||
pass 1.940602[move next prev]testing #001
|
||||
: foo+bar+baz[dankogai=""]$$$$ ...
|
||||
ok
|
||||
pass 0.200150[contains dash in attributes]testing #001
|
||||
: div[foo-bar="baz"] ...
|
||||
ok
|
||||
pass 0.144592[default attributes]testing #001
|
||||
: p.title>a[/hoge/] ...
|
||||
ok
|
||||
testing #002
|
||||
: script[jquery.js] ...
|
||||
ok
|
||||
pass 0.277444[multiple group]testing #001
|
||||
: .outer$*3>.inner$*2 ...
|
||||
ok
|
||||
pass 0.155586[group itemno]testing #001
|
||||
: dl>(dt{$}+dd)*3 ...
|
||||
ok
|
||||
testing #002
|
||||
: (div[attr=$]*3)*3 ...
|
||||
ok
|
||||
pass 0.365517[update tag]testing #001
|
||||
: <h$$$$3></h3> ...
|
||||
ok
|
||||
pass 0.188945[base value]testing #001
|
||||
: ul>li#id$@0*3 ...
|
||||
ok
|
||||
pass 0.145338[css][expand abbreviation]testing #001
|
||||
: {fs:n$$$$} ...
|
||||
ok
|
||||
testing #002
|
||||
: {fl:l|fc$$$$} ...
|
||||
ok
|
||||
testing #003
|
||||
: {bg+$$$$} ...
|
||||
ok
|
||||
testing #004
|
||||
: {bg+!$$$$} ...
|
||||
ok
|
||||
testing #005
|
||||
: {m$$$$} ...
|
||||
ok
|
||||
testing #006
|
||||
: {m0.1p$$$$} ...
|
||||
ok
|
||||
testing #007
|
||||
: {m1.0$$$$} ...
|
||||
ok
|
||||
testing #008
|
||||
: {m2$$$$} ...
|
||||
ok
|
||||
testing #009
|
||||
: {bdrs10$$$$} ...
|
||||
ok
|
||||
testing #010
|
||||
: {-bdrs20$$$$} ...
|
||||
ok
|
||||
testing #011
|
||||
: {lg(top,#fff,#000)$$$$} ...
|
||||
ok
|
||||
testing #012
|
||||
: {m10-5-0$$$$} ...
|
||||
ok
|
||||
testing #013
|
||||
: {m-10--5$$$$} ...
|
||||
ok
|
||||
testing #014
|
||||
: {m10-auto$$$$} ...
|
||||
ok
|
||||
testing #015
|
||||
: {w100p$$$$} ...
|
||||
ok
|
||||
testing #016
|
||||
: {h50e$$$$} ...
|
||||
ok
|
||||
testing #017
|
||||
: {(bg+)+c$$$$} ...
|
||||
ok
|
||||
testing #018
|
||||
: {m0+bgi+bg++p0$$$$} ...
|
||||
ok
|
||||
testing #019
|
||||
: {borle$$$$} ...
|
||||
ok
|
||||
testing #020
|
||||
: {c#dba$$$$} ...
|
||||
ok
|
||||
testing #021
|
||||
: {c#dba.7$$$$} ...
|
||||
ok
|
||||
testing #022
|
||||
: {dn$$$$} ...
|
||||
ok
|
||||
testing #023
|
||||
: {p10%$$$$} ...
|
||||
ok
|
||||
testing #024
|
||||
: {p10p$$$$} ...
|
||||
ok
|
||||
testing #025
|
||||
: {p10e$$$$} ...
|
||||
ok
|
||||
testing #026
|
||||
: {p10em$$$$} ...
|
||||
ok
|
||||
testing #027
|
||||
: {p10re$$$$} ...
|
||||
ok
|
||||
testing #028
|
||||
: {p10rem$$$$} ...
|
||||
ok
|
||||
pass 4.998573[haml][expand abbreviation]testing #001
|
||||
: div>p+ul#foo>li.bar$[foo=bar][bar=baz]*3>{baz} ...
|
||||
ok
|
||||
testing #002
|
||||
: div>p+ul#foo>li.bar$[foo=bar][bar=baz]*3>{baz}|haml ...
|
||||
ok
|
||||
testing #003
|
||||
: a*3|haml ...
|
||||
ok
|
||||
testing #004
|
||||
: .content{Hello!}|haml ...
|
||||
ok
|
||||
testing #005
|
||||
: a[title=$#]{foo} ...
|
||||
ok
|
||||
pass 0.854218[split join]testing #001
|
||||
: %a foo\n bar$$$$ ...
|
||||
ok
|
||||
testing #002
|
||||
: $$$$%a ...
|
||||
ok
|
||||
pass 0.411440[toggle comment]testing #001
|
||||
: %a{ :href => "http://www.google.com"$$$$ } hello ...
|
||||
ok
|
||||
testing #002
|
||||
: -# %a{ :href => "http://www.google.com"$$$$ } hello ...
|
||||
ok
|
||||
pass 0.399764[slim][expand abbreviation]testing #001
|
||||
: div>p+ul#foo>li.bar$[foo=bar][bar=baz]*3>{baz} ...
|
||||
ok
|
||||
testing #002
|
||||
: div>p+ul#foo>li.bar$[foo=bar][bar=baz]*3>{baz}|slim ...
|
||||
ok
|
||||
testing #003
|
||||
: a*3|slim ...
|
||||
ok
|
||||
testing #004
|
||||
: .content{Hello!}|slim ...
|
||||
ok
|
||||
testing #005
|
||||
: a[title=$#]{foo} ...
|
||||
ok
|
||||
pass 1.053588[split join tag]testing #001
|
||||
: a\n | foo$$$$ ...
|
||||
ok
|
||||
testing #002
|
||||
: a$$$$ ...
|
||||
ok
|
||||
pass 0.290832[toggle comment]testing #001
|
||||
: a href="http://www.google.com"$$$$\n | hello ...
|
||||
ok
|
||||
testing #002
|
||||
: /a href="http://www.google.com"$$$$\n | hello ...
|
||||
ok
|
||||
pass 0.289361[xsl][expand abbreviation]testing #001
|
||||
: vari ...
|
||||
ok
|
||||
testing #002
|
||||
: ap>wp ...
|
||||
ok
|
||||
pass 0.354678[xsd][expand abbreviation]testing #001
|
||||
: xsd:w3c ...
|
||||
ok
|
||||
pass 0.155347[mustache][expand abbreviation]testing #001
|
||||
: div#{{foo}} ...
|
||||
ok
|
||||
testing #002
|
||||
: div.{{foo}} ...
|
||||
ok
|
||||
pass 0.310753[scss][expand abbreviation]testing #001
|
||||
: @i$$$$ ...
|
||||
ok
|
||||
testing #002
|
||||
: {fs:n$$$$} ...
|
||||
ok
|
||||
testing #003
|
||||
: {fl:l|fc$$$$} ...
|
||||
ok
|
||||
testing #004
|
||||
: {bg+$$$$} ...
|
||||
ok
|
||||
testing #005
|
||||
: {bg+!$$$$} ...
|
||||
ok
|
||||
testing #006
|
||||
: {m$$$$} ...
|
||||
ok
|
||||
testing #007
|
||||
: {m0.1p$$$$} ...
|
||||
ok
|
||||
testing #008
|
||||
: {m1.0$$$$} ...
|
||||
ok
|
||||
testing #009
|
||||
: {m2$$$$} ...
|
||||
ok
|
||||
testing #010
|
||||
: {bdrs10$$$$} ...
|
||||
ok
|
||||
testing #011
|
||||
: {-bdrs20$$$$} ...
|
||||
ok
|
||||
testing #012
|
||||
: {lg(top,#fff,#000)$$$$} ...
|
||||
ok
|
||||
testing #013
|
||||
: {m10-5-0$$$$} ...
|
||||
ok
|
||||
testing #014
|
||||
: {m-10--5$$$$} ...
|
||||
ok
|
||||
testing #015
|
||||
: {m10-auto$$$$} ...
|
||||
ok
|
||||
testing #016
|
||||
: {w100p$$$$} ...
|
||||
ok
|
||||
testing #017
|
||||
: {h50e$$$$} ...
|
||||
ok
|
||||
testing #018
|
||||
: {(bg+)+c$$$$} ...
|
||||
ok
|
||||
pass 3.520060done
|
||||
Reference in New Issue
Block a user