diff --git a/public/images/emblems/Coat_of_arms_of_Andorra.svg b/public/images/emblems/Coat_of_arms_of_Andorra.svg
index 609d235..d0caea1 100644
--- a/public/images/emblems/Coat_of_arms_of_Andorra.svg
+++ b/public/images/emblems/Coat_of_arms_of_Andorra.svg
@@ -287,38 +287,38 @@
d="M509.436 463.299a44.84 44.84 0 0 1-4.679 14.295c-3.195 5.047-2.016 4.911-9.248 12.982a51.84 51.84 0 0 1-13.473 9.724 58.215 58.215 0 0 1-14.799 5.397 110.221 110.221 0 0 1-35.855 3.459c-7.427-.379-14.827-1.147-22.174-2.297-7.974-1.14-16-1.869-24.05-2.185-4.614-.195-8.978-.238-13.287 0a111.346 111.346 0 0 0-15.812 2.185 178.3 178.3 0 0 0-23.868 6.897l.123-185.299 177.809-.05v126.647s-.363 6.187-.688 8.242z"
class="e" />
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/public/images/emblems/Royal_Badge_of_Wales_2008-2024.svg b/public/images/emblems/Royal_Badge_of_Wales_2008-2024.svg
index 7e9bd31..edf1607 100644
--- a/public/images/emblems/Royal_Badge_of_Wales_2008-2024.svg
+++ b/public/images/emblems/Royal_Badge_of_Wales_2008-2024.svg
@@ -1608,8 +1608,8 @@
-
-
+
+
@@ -1645,7 +1645,7 @@
+ width="1010" xlink:href="#Royal_Badge_of_Wales_2008-2024_b" />
@@ -2033,7 +2033,7 @@
transform="matrix(-1.0403497 .85243782 .85243782 1.0403497 -419.41861 -1578.5122)" />
-
diff --git a/public/images/flags/ag-1962–1967.svg b/public/images/flags/ag-1962–1967.svg
index d852720..fe95edb 100644
--- a/public/images/flags/ag-1962–1967.svg
+++ b/public/images/flags/ag-1962–1967.svg
@@ -74,990 +74,990 @@
d="M-36.117-273.063a2.469 2.469 0 0 0-2.475 2.475c-.034.938-.027 1.954.113 2.828h-6.125v10.961H-19.5v-10.96h-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end of file
diff --git a/public/images/flags/ua-BilaCerkva.svg b/public/images/flags/ua-BilaCerkva.svg
index 66f4036..a52072a 100644
--- a/public/images/flags/ua-BilaCerkva.svg
+++ b/public/images/flags/ua-BilaCerkva.svg
@@ -9,11 +9,11 @@
-
+
-
+
\ No newline at end of file
diff --git a/public/images/flags/ua-Kyiv.svg b/public/images/flags/ua-Kyiv.svg
index 068924c..df10b00 100644
--- a/public/images/flags/ua-Kyiv.svg
+++ b/public/images/flags/ua-Kyiv.svg
@@ -202,11 +202,11 @@
d="M459.69 152.94c6.3 7.16 14.82 6.92 19.64 0 .49 7.66 1.36 11.98 7.16 16.06-5.93 3.46-30.38 2.96-36.43 0 6.05-.86 9.26-4.57 9.63-16.06z"
class="R W X" />
-
+
-
-
+
-
+
diff --git a/public/images/flags/us-in.svg b/public/images/flags/us-in.svg
index bd7ed43..30c0f3b 100644
--- a/public/images/flags/us-in.svg
+++ b/public/images/flags/us-in.svg
@@ -1,26 +1,26 @@
\ No newline at end of file
diff --git a/public/images/flags/us-mo.svg b/public/images/flags/us-mo.svg
index 53e19fd..7286e98 100644
--- a/public/images/flags/us-mo.svg
+++ b/public/images/flags/us-mo.svg
@@ -1522,49 +1522,49 @@
stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width=".518009" />
-
-
+ xlink:href="#us-mo_a" />
+
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
-
+ xlink:href="#us-mo_a" />
+
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
-
+ xlink:href="#us-mo_a" />
+
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
+ xlink:href="#us-mo_a" />
-
+ xlink:href="#us-mo_a" />
+
-
+ xlink:href="#us-mo_a" />
+
\ No newline at end of file
diff --git a/public/images/flags/us-oh.svg b/public/images/flags/us-oh.svg
index da5e60b..ce4a148 100644
--- a/public/images/flags/us-oh.svg
+++ b/public/images/flags/us-oh.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/public/images/flags/us-tn.svg b/public/images/flags/us-tn.svg
index 8704616..54b0967 100644
--- a/public/images/flags/us-tn.svg
+++ b/public/images/flags/us-tn.svg
@@ -1,5 +1,4 @@
\ No newline at end of file
+
diff --git a/public/images/flags/us-tx.svg b/public/images/flags/us-tx.svg
index 094ead8..5530844 100644
--- a/public/images/flags/us-tx.svg
+++ b/public/images/flags/us-tx.svg
@@ -3,13 +3,13 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/public/images/flags/us-ut.svg b/public/images/flags/us-ut.svg
index cac9096..2bc5b53 100644
--- a/public/images/flags/us-ut.svg
+++ b/public/images/flags/us-ut.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/public/images/flags/us-vt.svg b/public/images/flags/us-vt.svg
index 2cac94f..9b7c73f 100644
--- a/public/images/flags/us-vt.svg
+++ b/public/images/flags/us-vt.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/public/images/logos/android-auto.svg b/public/images/logos/android-auto.svg
index a66a15f..3d104e7 100644
--- a/public/images/logos/android-auto.svg
+++ b/public/images/logos/android-auto.svg
@@ -2,11 +2,11 @@
-
+
-
+
@@ -28,11 +28,11 @@
-
+
-
\ No newline at end of file
diff --git a/public/images/logos/apache.svg b/public/images/logos/apache.svg
index 1565a4a..57db2f2 100644
--- a/public/images/logos/apache.svg
+++ b/public/images/logos/apache.svg
@@ -1,74 +1,74 @@
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/public/images/logos/dockge.svg b/public/images/logos/dockge.svg
index 206b986..71d30b7 100644
--- a/public/images/logos/dockge.svg
+++ b/public/images/logos/dockge.svg
@@ -1,12 +1,12 @@
\ No newline at end of file
diff --git a/public/images/logos/facebook-messenger.svg b/public/images/logos/facebook-messenger.svg
index 8c9aea4..c98ace4 100644
--- a/public/images/logos/facebook-messenger.svg
+++ b/public/images/logos/facebook-messenger.svg
@@ -1,5 +1,5 @@
-
+
diff --git a/public/images/logos/google_chrome.svg b/public/images/logos/google_chrome.svg
index 1693f35..e4e71d9 100644
--- a/public/images/logos/google_chrome.svg
+++ b/public/images/logos/google_chrome.svg
@@ -3,80 +3,80 @@
-
-
+
-
-
-
-
+
-
-
+
-
-
-
-
+
-
-
+
-
-
-
+
-
+
@@ -117,12 +117,12 @@
-
-
+
diff --git a/public/images/logos/google_chrome_icon.svg b/public/images/logos/google_chrome_icon.svg
index 08f3de9..7dd3d46 100644
--- a/public/images/logos/google_chrome_icon.svg
+++ b/public/images/logos/google_chrome_icon.svg
@@ -1,14 +1,14 @@
-
+
-
+
-
+
@@ -18,12 +18,12 @@
d="M3.2154,36A24,24,0,1,0,12,3.2154,24,24,0,0,0,3.2154,36ZM34.3923,18A12,12,0,1,1,18,13.6077,12,12,0,0,1,34.3923,18Z"
style="fill:none" />
+ style="fill:url(#google_chrome_icon_a)" />
+ style="fill:url(#google_chrome_icon_b)" />
+ style="fill:url(#google_chrome_icon_c)" />
\ No newline at end of file
diff --git a/public/images/logos/grafana.svg b/public/images/logos/grafana.svg
index 12d574c..53dfdce 100644
--- a/public/images/logos/grafana.svg
+++ b/public/images/logos/grafana.svg
@@ -1,10 +1,10 @@
-
+ style="fill:url(#grafana_a)" />
\ No newline at end of file
diff --git a/public/images/logos/homebridge.svg b/public/images/logos/homebridge.svg
index 566a804..79b046d 100644
--- a/public/images/logos/homebridge.svg
+++ b/public/images/logos/homebridge.svg
@@ -1,17 +1,17 @@
-
-
-
+
-
+
diff --git a/public/images/logos/jellyfin.svg b/public/images/logos/jellyfin.svg
index 7a3e939..2f3c6c6 100644
--- a/public/images/logos/jellyfin.svg
+++ b/public/images/logos/jellyfin.svg
@@ -1,16 +1,16 @@
-
-
-
+
+ style="fill:url(#jellyfin_b)" />
\ No newline at end of file
diff --git a/public/images/logos/shadoll.svg b/public/images/logos/shadoll.svg
index 6ded17e..01096fd 100644
--- a/public/images/logos/shadoll.svg
+++ b/public/images/logos/shadoll.svg
@@ -1,7 +1,7 @@
-
-
+
diff --git a/public/images/logos/tesla.svg b/public/images/logos/tesla.svg
index 911ed14..0300811 100644
--- a/public/images/logos/tesla.svg
+++ b/public/images/logos/tesla.svg
@@ -36,7 +36,7 @@
/>
-
+
diff --git a/scripts/svg-cleanup.js b/scripts/svg-cleanup.js
index 855e9da..b780797 100644
--- a/scripts/svg-cleanup.js
+++ b/scripts/svg-cleanup.js
@@ -10,6 +10,57 @@ const { collections } = require('../src/collections.js');
const collectionArg = process.argv.find(arg => arg.startsWith('--collection='));
const collectionName = collectionArg ? collectionArg.split('=')[1] : (process.env.COLLECTION || 'logos');
+// Fix single-letter ID conflicts in SVG content
+function fixSvgIds(svgContent, filename) {
+ let content = svgContent;
+ let updated = false;
+ let count = 0;
+
+ // Find all single-letter IDs (both lowercase and uppercase)
+ const idMatches = content.match(/\bid\s*=\s*["']([a-zA-Z])["']/g);
+
+ if (!idMatches) {
+ return { content, updated, count };
+ }
+
+ // Create a map of old ID to new ID
+ const idMap = new Map();
+
+ for (const match of idMatches) {
+ const idMatch = match.match(/\bid\s*=\s*["']([a-zA-Z])["']/);
+ if (idMatch) {
+ const oldId = idMatch[1];
+ const newId = `${filename}_${oldId}`;
+
+ if (!idMap.has(oldId)) {
+ idMap.set(oldId, newId);
+ }
+ }
+ }
+
+ // Replace all single-letter IDs with prefixed versions
+ for (const [oldId, newId] of idMap) {
+ // Replace id attribute declarations
+ const idRegex = new RegExp(`\\bid\\s*=\\s*["']${oldId}["']`, 'g');
+ content = content.replace(idRegex, `id="${newId}"`);
+
+ // Replace references to the ID in url(), href, and other attributes
+ const urlRegex = new RegExp(`url\\(#${oldId}\\)`, 'g');
+ content = content.replace(urlRegex, `url(#${newId})`);
+
+ const hrefRegex = new RegExp(`href\\s*=\\s*["']#${oldId}["']`, 'g');
+ content = content.replace(hrefRegex, `href="#${newId}"`);
+
+ const xlinkHrefRegex = new RegExp(`xlink:href\\s*=\\s*["']#${oldId}["']`, 'g');
+ content = content.replace(xlinkHrefRegex, `xlink:href="#${newId}"`);
+
+ count++;
+ updated = true;
+ }
+
+ return { content, updated, count };
+}
+
// SVG validation and fixing function
function validateAndFixSvg(svgPath) {
try {
@@ -86,8 +137,18 @@ function validateAndFixSvg(svgPath) {
console.log(`${path.basename(svgPath)}: Updated height to 100%`);
}
+ // Fix ID conflicts - rename single-letter IDs
+ const idUpdates = fixSvgIds(svgContent, path.basename(svgPath, '.svg'));
+ if (idUpdates.updated) {
+ svgContent = idUpdates.content;
+ modified = true;
+ console.log(`${path.basename(svgPath)}: Updated ${idUpdates.count} single-letter IDs`);
+ }
+
if (modified) {
- svgContent = svgContent.replace(svgTag, newSvgTag);
+ if (newSvgTag !== svgTag) {
+ svgContent = svgContent.replace(svgTag, newSvgTag);
+ }
fs.writeFileSync(svgPath, svgContent, 'utf8');
console.log(`${path.basename(svgPath)}: SVG file updated`);
}