mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Fix md document links for untitled files (#155248)
This commit is contained in:
parent
171537fd73
commit
394eaa9fa3
|
@ -162,7 +162,10 @@ export class VsCodeClientWorkspace implements md.IWorkspace {
|
|||
}
|
||||
}
|
||||
|
||||
stat(resource: URI): Promise<md.FileStat | undefined> {
|
||||
async stat(resource: URI): Promise<md.FileStat | undefined> {
|
||||
if (this._documentCache.has(resource) || this.documents.get(resource.toString())) {
|
||||
return { isDirectory: false };
|
||||
}
|
||||
return this.connection.sendRequest(protocol.statFileRequestType, { uri: resource.toString() });
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ async function getLinksForFile(file: vscode.Uri): Promise<vscode.DocumentLink[]>
|
|||
}
|
||||
});
|
||||
|
||||
test.skip('Should navigate to fragment within current untitled file', async () => { // TODO: skip for now for ls migration
|
||||
test('Should navigate to fragment within current untitled file', async () => { // TODO: skip for now for ls migration
|
||||
const testFile = workspaceFile('x.md').with({ scheme: 'untitled' });
|
||||
await withFileContents(testFile, joinLines(
|
||||
'[](#second)',
|
||||
|
|
Loading…
Reference in a new issue