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:
authorSandeep Somavarapu <sasomava@microsoft.com>2022-09-13 21:35:14 +0300
committerSandeep Somavarapu <sasomava@microsoft.com>2022-09-13 21:35:14 +0300
commitbb54b84573a141744e3ab51db06f59b4757fc137 (patch)
tree3fe9212324c746d3d9f2bec19d50784eb1bf9032 /extensions/html-language-features/server/src/utils
parentd0d5cbd82f4944741a40ff2784dc86f296825a23 (diff)
parent28e52a46fe8df0c924c881e438e124c05f171b9c (diff)
Merge branch 'main' into sandy081/profilesStorageServicesandy081/profilesStorageService
Diffstat (limited to 'extensions/html-language-features/server/src/utils')
-rw-r--r--extensions/html-language-features/server/src/utils/documentContext.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/extensions/html-language-features/server/src/utils/documentContext.ts b/extensions/html-language-features/server/src/utils/documentContext.ts
index 88e3f032885..9cf8ce9ea76 100644
--- a/extensions/html-language-features/server/src/utils/documentContext.ts
+++ b/extensions/html-language-features/server/src/utils/documentContext.ts
@@ -6,7 +6,7 @@
import { DocumentContext } from 'vscode-css-languageservice';
import { endsWith, startsWith } from '../utils/strings';
import { WorkspaceFolder } from 'vscode-languageserver';
-import { resolvePath } from '../requests';
+import { URI, Utils } from 'vscode-uri';
export function getDocumentContext(documentUri: string, workspaceFolders: WorkspaceFolder[]): DocumentContext {
function getRootFolder(): string | undefined {
@@ -34,8 +34,9 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp
return folderUri + ref.substr(1);
}
}
- base = base.substr(0, base.lastIndexOf('/') + 1);
- return resolvePath(base, ref);
+ const baseUri = URI.parse(base);
+ const baseUriDir = baseUri.path.endsWith('/') ? baseUri : Utils.dirname(baseUri);
+ return Utils.resolvePath(baseUriDir, ref).toString(true);
},
};
}