Don't try parsing non-markdown files (#152661)

This fixes our references and rename provider to not try parsing non-markdown files as if they were markdown
This commit is contained in:
Matt Bierner
2022-06-20 10:44:50 -07:00
committed by GitHub
parent b3dc3301dd
commit 0bc3109761
8 changed files with 71 additions and 46 deletions

View File

@@ -22,10 +22,14 @@ export class InMemoryWorkspaceMarkdownDocuments implements MdWorkspaceContents {
return Array.from(this._documents.values());
}
public async getMarkdownDocument(resource: vscode.Uri): Promise<SkinnyTextDocument | undefined> {
public async getOrLoadMarkdownDocument(resource: vscode.Uri): Promise<SkinnyTextDocument | undefined> {
return this._documents.get(resource);
}
public hasMarkdownDocument(resolvedHrefPath: vscode.Uri): boolean {
return this._documents.has(resolvedHrefPath);
}
public async pathExists(resource: vscode.Uri): Promise<boolean> {
return this._documents.has(resource);
}