提交 bfc4e3d7 编写于 作者: M Martin Aeschlimann

[html] support for base url. Fixes #20729

上级 df3c4151
......@@ -254,12 +254,16 @@ connection.onDocumentRangeFormatting(formatParams => {
connection.onDocumentLinks(documentLinkParam => {
let document = documents.get(documentLinkParam.textDocument.uri);
let documentContext: DocumentContext = {
resolveReference: ref => {
resolveReference: (ref, base) => {
if (base) {
ref = url.resolve(base, ref);
}
if (workspacePath && ref[0] === '/') {
return uri.file(path.join(workspacePath, ref)).toString();
}
return url.resolve(document.uri, ref);
}
},
};
let links: DocumentLink[] = [];
languageModes.getAllModesInDocument(document).forEach(m => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册