extensions/markdown-language-features/src/languageFeatures/diagnostics.ts/DiagnosticComputer/getDiagnostics
class DiagnosticComputer:	public async getDiagnostics(doc: ITextDocument, options: DiagnosticOptions, token: vscode.CancellationToken): Promise<{ readonly diagnostics: vscode.Diagnostic[]; readonly links: readonly MdLink[] }> {
		const { links, definitions } = await this.linkProvider.getLinks(doc);
		if (token.isCancellationRequested || !options.enabled) {
			return { links, diagnostics: [] };
		}

		return {
			links,
			diagnostics: (await Promise.all([
				this.validateFileLinks(options, links, token),
				Array.from(this.validateReferenceLinks(options, links, definitions)),
				this.validateFragmentLinks(doc, options, links, token),
			])).flat()
		};
	}