extensions/html-language-features/server/src/modes/embeddedSupport.ts/getLanguagesInDocument
function getLanguagesInDocument(_document: TextDocument, regions: EmbeddedRegion[]): string[] {
	let result = [];
	for (let region of regions) {
		if (region.languageId && result.indexOf(region.languageId) === -1) {
			result.push(region.languageId);
			if (result.length === 3) {
				return result;
			}
		}
	}
	result.push('html');
	return result;
}