Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8536-compatibility-third-party-themes #8964

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,13 @@ export class MonacoThemeRegistry {
return undefined;
}
const normalized = String(color).replace(/^\#/, '').slice(0, 6);
if (normalized.length < 6) {
if (normalized.length < 6 || !(normalized).match(/^[0-9A-Fa-f]{6}$/)) {
// ignoring not normalized colors to avoid breaking token color indexes between monaco and vscode-textmate
console.error(`Color '${normalized}' is NOT normalized, it must have 6 positions.`);
return undefined;
}
return '#' + normalized;
}

}

export namespace MonacoThemeRegistry {
Expand Down