mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Merge pull request #406 from DenverCoderOne/feat-Make-tag-list-search-case-insensitive
feat: Make tag list search case-insensitive
This commit is contained in:
commit
e207874ebf
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ export const TagListCmd = tagsCmd({
|
|||
|
||||
const prefix = (await pluginData.config.getForMessage(msg)).prefix;
|
||||
const tagNames = tags.map((tag) => tag.tag).sort();
|
||||
const searchRegex = args.search ? new RegExp([...args.search].map((s) => escapeStringRegexp(s)).join(".*")) : null;
|
||||
const searchRegex = args.search ? new RegExp([...args.search].map((s) => escapeStringRegexp(s)).join(".*"), "i") : null;
|
||||
|
||||
const filteredTags = args.search ? tagNames.filter((tag) => searchRegex!.test(tag)) : tagNames;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue