update to jsonc-parser 0.2.0

This commit is contained in:
Martin Aeschlimann
2016-04-20 14:07:41 +02:00
parent 85f337ee08
commit 6e8f659617
5 changed files with 61 additions and 57 deletions

View File

@@ -162,15 +162,17 @@ export class BowerJSONContribution implements IJSONContribution {
public getInfoContribution(resource: string, location: Location): Thenable<MarkedString[]> {
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']))) {
let pack = location.segments[location.segments.length - 1];
let htmlContent : MarkedString[] = [];
htmlContent.push(localize('json.bower.package.hover', '{0}', pack));
return this.getInfo(pack).then(documentation => {
if (documentation) {
htmlContent.push(documentation);
}
return htmlContent;
});
let pack = location.path[location.path.length - 1];
if (typeof pack === 'string') {
let htmlContent : MarkedString[] = [];
htmlContent.push(localize('json.bower.package.hover', '{0}', pack));
return this.getInfo(pack).then(documentation => {
if (documentation) {
htmlContent.push(documentation);
}
return htmlContent;
});
}
}
return null;
}