extensions/markdown-language-features/src/languageFeatures/references.ts/tryResolveLinkPath
export async function tryResolveLinkPath(originalUri: vscode.Uri, workspace: IMdWorkspace): Promise<vscode.Uri | undefined> {
	if (await workspace.pathExists(originalUri)) {
		return originalUri;
	}

	// We don't think the file exists. If it doesn't already have an extension, try tacking on a `.md` and using that instead
	if (uri.Utils.extname(originalUri) === '') {
		const dotMdResource = originalUri.with({ path: originalUri.path + '.md' });
		if (await workspace.pathExists(dotMdResource)) {
			return dotMdResource;
		}
	}

	return undefined;
}