Keeps only the problematic line out
This commit is contained in:
Connor Peet
2024-04-15 15:31:14 -07:00
committed by GitHub
parent 3514871f34
commit 714ce79ed9
16 changed files with 68 additions and 40 deletions

View File

@@ -18,6 +18,8 @@ function getKnownVariableNames() {
return knownVariables;
}
const iconVariable = /^--vscode-icon-.+-(content|font-family)$/;
export interface IValidator {
(value: string, report: (message: string) => void): void;
}
@@ -29,7 +31,7 @@ export function getVariableNameValidator(): IValidator {
let match;
while (match = RE_VAR_PROP.exec(value)) {
const variableName = match[1];
if (variableName && !allVariables.has(variableName)) {
if (variableName && !allVariables.has(variableName) && !iconVariable.test(variableName)) {
report(variableName);
}
}