From e406eb30df8f2fa78b61fc0ba138ea8f6e5ca1e7 Mon Sep 17 00:00:00 2001 From: Bergbok <66174189+Bergbok@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:11:05 +0200 Subject: [PATCH] Fix right click tag removal regex matching incorrect tags Was removing all tags containing the right clicked tag instead of only the right clicked tag --- CustomApps/playlist-tags/package.json | 2 +- CustomApps/playlist-tags/src/app.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CustomApps/playlist-tags/package.json b/CustomApps/playlist-tags/package.json index 8e02e22..765d1ac 100644 --- a/CustomApps/playlist-tags/package.json +++ b/CustomApps/playlist-tags/package.json @@ -1,6 +1,6 @@ { "name": "playlist-tags", - "version": "1.7.1", + "version": "1.7.2", "private": true, "scripts": { "build": "spicetify-creator", diff --git a/CustomApps/playlist-tags/src/app.tsx b/CustomApps/playlist-tags/src/app.tsx index 358a975..b240d0d 100644 --- a/CustomApps/playlist-tags/src/app.tsx +++ b/CustomApps/playlist-tags/src/app.tsx @@ -297,7 +297,7 @@ const App = () => { break; } }} - onContextMenu={() => {removeTagFromAllPlaylists(new RegExp(escapeRegExp(tag))); setFilterQuery(removeStringFromStringArray(filter_query_terms, tag)); updateTagList()}}>{/* {tag} */} + onContextMenu={() => {removeTagFromAllPlaylists(new RegExp((`^${escapeRegExp(tag)}$`))); setFilterQuery(removeStringFromStringArray(filter_query_terms, tag)); updateTagList()}}>{/* {tag} */}
${tag}` }}>
); @@ -342,7 +342,7 @@ const App = () => { } setActiveLink('Search'); }} - onContextMenu={() => {removeTagFromAllPlaylists(new RegExp(tag)); updateTagList()}}>{tag} + onContextMenu={() => {removeTagFromAllPlaylists(new RegExp(`^${escapeRegExp(tag)}$`)); updateTagList()}}>{tag} )) }