mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 15:01:57 +01:00
[css] path completion in web
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
|
||||
import { DocumentContext } from 'vscode-css-languageservice';
|
||||
import { endsWith, startsWith } from '../utils/strings';
|
||||
import * as url from 'url';
|
||||
import { WorkspaceFolder } from 'vscode-languageserver';
|
||||
import { resolvePath } from '../requests';
|
||||
|
||||
export function getDocumentContext(documentUri: string, workspaceFolders: WorkspaceFolder[]): DocumentContext {
|
||||
function getRootFolder(): string | undefined {
|
||||
@@ -30,7 +30,8 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp
|
||||
return folderUri + ref.substr(1);
|
||||
}
|
||||
}
|
||||
return url.resolve(base, ref);
|
||||
base = base.substr(0, base.lastIndexOf('/') + 1);
|
||||
return resolvePath(base, ref);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user