mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
@@ -33,7 +33,16 @@ class TsconfigLinkProvider implements vscode.DocumentLinkProvider {
|
||||
}
|
||||
|
||||
private getExendsLink(document: vscode.TextDocument, root: jsonc.Node): vscode.DocumentLink | undefined {
|
||||
return this.pathNodeToLink(document, jsonc.findNodeAtLocation(root, ['extends']));
|
||||
const extendsNode = jsonc.findNodeAtLocation(root, ['extends']);
|
||||
if (!this.isPathValue(extendsNode)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return new vscode.DocumentLink(
|
||||
this.getRange(document, extendsNode),
|
||||
basename(extendsNode.value).match('.json$')
|
||||
? this.getFileTarget(document, extendsNode)
|
||||
: vscode.Uri.file(join(dirname(document.uri.fsPath), extendsNode!.value + '.json')));
|
||||
}
|
||||
|
||||
private getFilesLinks(document: vscode.TextDocument, root: jsonc.Node) {
|
||||
|
||||
Reference in New Issue
Block a user