File tree Expand file tree Collapse file tree 4 files changed +20
-8
lines changed
Expand file tree Collapse file tree 4 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 22 "name" : " vscode-html-css" ,
33 "displayName" : " HTML CSS Support" ,
44 "description" : " CSS support in HTML documents" ,
5- "version" : " 0.0.15 " ,
5+ "version" : " 0.0.16 " ,
66 "publisher" : " ecmel" ,
77 "license" : " MIT" ,
88 "homepage" : " https://github.com/ecmel/vscode-html-css" ,
Original file line number Diff line number Diff line change 1+ {
2+ "css" : {
3+ "test" : [
4+ " test/test.css"
5+ ]
6+ }
7+ }
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ class ClassServer implements vsc.CompletionItemProvider {
131131 for ( let item in items ) {
132132 ci . push ( items [ item ] ) ;
133133 }
134- return new vsc . CompletionList ( ci , false ) ;
134+ return new vsc . CompletionList ( ci ) ;
135135 }
136136 return null ;
137137 }
@@ -169,16 +169,21 @@ function parse(uri: vsc.Uri) {
169169}
170170
171171function parseResource ( resource : any ) : string {
172- let glob = '{'
172+ let glob = ''
173+ let count = 0 ;
173174 for ( let key in resource . css ) {
174175 for ( let item of resource . css [ key ] ) {
175- glob = glob + item + ',' ;
176+ glob += item + ',' ;
177+ count ++ ;
176178 }
177179 }
178- if ( glob . substring ( glob . length - 1 ) === ',' ) {
179- glob = glob . substring ( 0 , glob . length - 2 ) ;
180+ if ( count > 0 ) {
181+ glob = glob . slice ( 0 , - 1 ) ;
180182 }
181- return glob + '}' ;
183+ if ( count > 1 ) {
184+ glob = '{' + glob + '}' ;
185+ }
186+ return glob ;
182187}
183188
184189export function activate ( context : vsc . ExtensionContext ) {
Original file line number Diff line number Diff line change 1414</ head >
1515
1616< body >
17- < a href ="# " style ="color: white; background-color: ghostwhite; " class ="test test2 test3 "> TEST</ a >
17+ < a href ="# " style ="color: white; background-color: ghostwhite; " class =""> TEST</ a >
1818 < a href ="# " style ="
1919 color: white;
2020 background-color: ghostwhite;
You can’t perform that action at this time.
0 commit comments