mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Lots of borders in package.json hover. Fixes #14526
This commit is contained in:
@@ -170,13 +170,11 @@ export class BowerJSONContribution implements IJSONContribution {
|
||||
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']))) {
|
||||
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(textToMarkedString(documentation));
|
||||
return [textToMarkedString(documentation)];
|
||||
}
|
||||
return htmlContent;
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,13 +211,11 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']) || location.matches(['optionalDependencies', '*']) || location.matches(['peerDependencies', '*']))) {
|
||||
let pack = location.path[location.path.length - 1];
|
||||
if (typeof pack === 'string') {
|
||||
let htmlContent: MarkedString[] = [];
|
||||
htmlContent.push(localize('json.npm.package.hover', '{0}', pack));
|
||||
return this.getInfo(pack).then(infos => {
|
||||
infos.forEach(info => {
|
||||
htmlContent.push(textToMarkedString(info));
|
||||
});
|
||||
return htmlContent;
|
||||
if (infos.length) {
|
||||
return [infos.map(textToMarkedString).join('\n\n')];
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user