From 88278c71bbbcb6f8ef07ca4a20e0292096b106d7 Mon Sep 17 00:00:00 2001 From: Explicit12 Date: Thu, 9 Jan 2025 09:30:48 +0200 Subject: [PATCH] Fixed icon parser issue when named slots were considered as icons --- src/assets/icons/vueless/edit.svg | 1 - src/assets/icons/vueless/expand.svg | 1 - src/assets/icons/vueless/label.svg | 1 - src/assets/icons/vueless/title.svg | 1 - src/utils/node/loaderIcon.js | 5 +++-- 5 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 src/assets/icons/vueless/edit.svg delete mode 100644 src/assets/icons/vueless/expand.svg delete mode 100644 src/assets/icons/vueless/label.svg delete mode 100644 src/assets/icons/vueless/title.svg diff --git a/src/assets/icons/vueless/edit.svg b/src/assets/icons/vueless/edit.svg deleted file mode 100644 index ad1f8de2..00000000 --- a/src/assets/icons/vueless/edit.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/icons/vueless/expand.svg b/src/assets/icons/vueless/expand.svg deleted file mode 100644 index 2be8644d..00000000 --- a/src/assets/icons/vueless/expand.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/icons/vueless/label.svg b/src/assets/icons/vueless/label.svg deleted file mode 100644 index c4cc6491..00000000 --- a/src/assets/icons/vueless/label.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/icons/vueless/title.svg b/src/assets/icons/vueless/title.svg deleted file mode 100644 index c2f39d51..00000000 --- a/src/assets/icons/vueless/title.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/utils/node/loaderIcon.js b/src/utils/node/loaderIcon.js index a6ddbe85..20dfc254 100644 --- a/src/utils/node/loaderIcon.js +++ b/src/utils/node/loaderIcon.js @@ -177,13 +177,14 @@ async function findAndCopyIcons(files) { } /* Vueless components props */ - const uComponentIconNamePattern = `\\b\\w*(name|icon)\\w*\\s*=\\s*(['"])(.*?)\\2`; + const iconPropsPattern = `\\b\\w*(name|icon)\\w*\\s*=\\s*(['"])(.*?)\\2`; + const uComponentIconNamePattern = //; const uComponentIconNameArray = fileContents.match(new RegExp(uComponentIconNamePattern, "g")); if (!uComponentIconNameArray) return; for (const match of uComponentIconNameArray) { - const groupMatch = match.match(new RegExp(uComponentIconNamePattern)); + const groupMatch = match.match(new RegExp(iconPropsPattern)); const iconName = groupMatch ? groupMatch[3] : null; try {