mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
[html] Format code of type="text/babel" scripts in html files. Fixes #39866
This commit is contained in:
@@ -56,7 +56,7 @@ export function getDocumentRegions(languageService: LanguageService, document: T
|
||||
}
|
||||
importedScripts.push(value);
|
||||
} else if (lastAttributeName === 'type' && lastTagName.toLowerCase() === 'script') {
|
||||
if (/["'](module|(text|application)\/(java|ecma)script)["']/.test(scanner.getTokenText())) {
|
||||
if (/["'](module|(text|application)\/(java|ecma)script|text\/babel)["']/.test(scanner.getTokenText())) {
|
||||
languageIdFromType = 'javascript';
|
||||
} else {
|
||||
languageIdFromType = undefined;
|
||||
@@ -228,4 +228,4 @@ function getAttributeLanguage(attributeName: string): string | null {
|
||||
return null;
|
||||
}
|
||||
return match[1] ? 'css' : 'javascript';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user