extensions/markdown-language-features/src/util/openDocumentLink.ts/resolveUriToMarkdownFile
export async function resolveUriToMarkdownFile(resource: vscode.Uri): Promise<vscode.TextDocument | undefined> {
	try {
		const doc = await tryResolveUriToMarkdownFile(resource);
		if (doc) {
			return doc;
		}
	} catch {
		// Noop
	}

	// If no extension, try with `.md` extension
	if (uri.Utils.extname(resource) === '') {
		return tryResolveUriToMarkdownFile(resource.with({ path: resource.path + '.md' }));
	}

	return undefined;
}