mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
[handlebars] validation issue in Handlebars file. Fixes #18777
This commit is contained in:
parent
17596b27ea
commit
9b47ab5339
|
@ -125,11 +125,13 @@ function triggerValidation(textDocument: TextDocument): void {
|
|||
|
||||
function validateTextDocument(textDocument: TextDocument): void {
|
||||
let diagnostics: Diagnostic[] = [];
|
||||
languageModes.getAllModesInDocument(textDocument).forEach(mode => {
|
||||
if (mode.doValidation && validation[mode.getId()]) {
|
||||
pushAll(diagnostics, mode.doValidation(textDocument));
|
||||
}
|
||||
});
|
||||
if (textDocument.languageId === 'html') {
|
||||
languageModes.getAllModesInDocument(textDocument).forEach(mode => {
|
||||
if (mode.doValidation && validation[mode.getId()]) {
|
||||
pushAll(diagnostics, mode.doValidation(textDocument));
|
||||
}
|
||||
});
|
||||
}
|
||||
connection.sendDiagnostics({ uri: textDocument.uri, diagnostics });
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue