Update icon validation to require '.svg' extension in names and remove tag checks for filled icons, enhancing validation accuracy.

This commit is contained in:
codecalm 2025-12-23 02:42:47 +01:00
parent 9a92c85919
commit b637a86c96
2 changed files with 1 additions and 9 deletions

View File

@ -213,7 +213,7 @@ for (const icon of addedIcons) {
error = true
}
if (!icon.match(/^(outline|filled)\/[a-z0-9-]+$/)) {
if (!icon.match(/^(outline|filled)\/[a-z0-9-]+\.svg$/)) {
console.log(`⛔️ New icon \`${icon}\` has invalid name`)
error = true
}
@ -233,12 +233,6 @@ for (const icon of addedIcons) {
error = true
}
}
// check if filled icon has tags
if (icon.match(/^filled\//) && data.tags) {
console.log(`⛔️ New icon \`${icon}\` has tags, but should not have it`)
error = true
}
} catch (error) {
console.log(`⛔️ New icon \`${icon}\` has invalid metadata`)
error = true

View File

@ -1,6 +1,4 @@
<!--
tags: [symbol, queen, king, prince, princess, dynasty, royalty]
version: "1.0"
-->
<svg
xmlns="http://www.w3.org/2000/svg"

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 315 B