extensions/markdown-language-features/src/languageFeatures/diagnostics.ts/toSeverity
function toSeverity(level: DiagnosticLevel | undefined): vscode.DiagnosticSeverity | undefined {
	switch (level) {
		case DiagnosticLevel.error: return vscode.DiagnosticSeverity.Error;
		case DiagnosticLevel.warning: return vscode.DiagnosticSeverity.Warning;
		case DiagnosticLevel.ignore: return undefined;
		case undefined: return undefined;
	}
}