mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
[html] JavaScript IntelliSense in <script type=module> HTML without quotes breaks (#247405)
This commit is contained in:
committed by
GitHub
parent
8e5fe7bf5e
commit
d9951c029e
@@ -56,9 +56,10 @@ export function getDocumentRegions(languageService: LanguageService, document: T
|
||||
}
|
||||
importedScripts.push(value);
|
||||
} else if (lastAttributeName === 'type' && lastTagName.toLowerCase() === 'script') {
|
||||
if (/["'](module|(text|application)\/(java|ecma)script|text\/babel)["']/.test(scanner.getTokenText())) {
|
||||
const token = scanner.getTokenText();
|
||||
if (/["'](module|(text|application)\/(java|ecma)script|text\/babel)["']/.test(token) || token === 'module') {
|
||||
languageIdFromType = 'javascript';
|
||||
} else if (/["']text\/typescript["']/.test(scanner.getTokenText())) {
|
||||
} else if (/["']text\/typescript["']/.test(token)) {
|
||||
languageIdFromType = 'typescript';
|
||||
} else {
|
||||
languageIdFromType = undefined;
|
||||
|
||||
Reference in New Issue
Block a user