src/vs/editor/common/languages/textToHtmlTokenizer.ts/tokenizeToString
export async function tokenizeToString(languageService: ILanguageService, text: string, languageId: string | null): Promise<string> {
	if (!languageId) {
		return _tokenizeToString(text, languageService.languageIdCodec, fallback);
	}
	const tokenizationSupport = await TokenizationRegistry.getOrCreate(languageId);
	return _tokenizeToString(text, languageService.languageIdCodec, tokenizationSupport || fallback);
}