From 217f8584d4f543c1797f4c77ff7b09c37c75fa05 Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Wed, 22 May 2024 14:08:57 +0200 Subject: [PATCH] chore: escape chars in icon fetching script Parenthesis chars are being used and they need to be escaped --- packages/orbit-components/config/fetchIcons.mts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/orbit-components/config/fetchIcons.mts b/packages/orbit-components/config/fetchIcons.mts index 90174ad303..687f0478e0 100644 --- a/packages/orbit-components/config/fetchIcons.mts +++ b/packages/orbit-components/config/fetchIcons.mts @@ -231,7 +231,10 @@ async function saveOrbitIcons(data: { name: string; svg: string; id: string }[]) const nodeId = nodes[id] as string; return { id, - name: nodeId.toLowerCase().replace(/\+kg/, "").replace(/\s+/g, "-"), + name: nodeId + .toLowerCase() + .replace(/\+kg|\(|\)/g, "") + .replace(/\s+/g, "-"), svg: await res.text(), }; }),