mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
[html] support for base url. Fixes #20729
This commit is contained in:
parent
df3c4151a8
commit
bfc4e3d780
|
@ -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 => {
|
||||
|
|
Loading…
Reference in a new issue