[html] update service and fix url resolving (#155725)

This commit is contained in:
Martin Aeschlimann
2022-07-20 14:38:10 +02:00
committed by GitHub
parent fa155a39b7
commit d0769c7e7f
3 changed files with 9 additions and 5 deletions

View File

@@ -24,6 +24,10 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp
return {
resolveReference: (ref: string, base = documentUri) => {
if (ref.match(/^\w[\w\d+.-]*:/)) {
// starts with a schema
return ref;
}
if (ref[0] === '/') { // resolve absolute path against the current workspace folder
const folderUri = getRootFolder();
if (folderUri) {