mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
"html.validate.scripts" not applied on folder. Fixes #33533
This commit is contained in:
parent
80a4c2f9f3
commit
e369dd0789
|
@ -54,6 +54,7 @@ documents.onDidClose(e => {
|
|||
});
|
||||
|
||||
function getDocumentSettings(textDocument: TextDocument, needsDocumentSettings: () => boolean): Thenable<Settings> {
|
||||
console.log('scopedSettingsSupport ' + scopedSettingsSupport + 'needsSettings ' + needsDocumentSettings());
|
||||
if (scopedSettingsSupport && needsDocumentSettings()) {
|
||||
let promise = documentSettings[textDocument.uri];
|
||||
if (!promise) {
|
||||
|
@ -184,7 +185,7 @@ async function validateTextDocument(textDocument: TextDocument) {
|
|||
let diagnostics: Diagnostic[] = [];
|
||||
if (textDocument.languageId === 'html') {
|
||||
let modes = languageModes.getAllModesInDocument(textDocument);
|
||||
let settings = await getDocumentSettings(textDocument, () => modes.some(m => m.doValidation && m.doValidation.length > 1));
|
||||
let settings = await getDocumentSettings(textDocument, () => modes.some(m => !!m.doValidation));
|
||||
modes.forEach(mode => {
|
||||
if (mode.doValidation && isValidationEnabled(mode.getId(), settings)) {
|
||||
pushAll(diagnostics, mode.doValidation(textDocument, settings));
|
||||
|
|
Loading…
Reference in a new issue