mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
"html.validate.scripts" not applied on folder. Fixes #33533
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user