Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Aeschlimann <martinae@microsoft.com>2022-07-20 15:38:10 +0300
committerGitHub <noreply@github.com>2022-07-20 15:38:10 +0300
commitd0769c7e7f8cfbf6481c9196a197021a833176fc (patch)
tree9dfaf4bcfc710a4dbaf91f9881fc4bf2723a6268 /extensions/html-language-features/server/src/utils/documentContext.ts
parentfa155a39b75c909c5968414d88eb405e21bce344 (diff)
[html] update service and fix url resolving (#155725)
Diffstat (limited to 'extensions/html-language-features/server/src/utils/documentContext.ts')
-rw-r--r--extensions/html-language-features/server/src/utils/documentContext.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/extensions/html-language-features/server/src/utils/documentContext.ts b/extensions/html-language-features/server/src/utils/documentContext.ts
index fb1a6622674..88e3f032885 100644
--- a/extensions/html-language-features/server/src/utils/documentContext.ts
+++ b/extensions/html-language-features/server/src/utils/documentContext.ts
@@ -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) {