3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 00:35:02 +00:00

Merge branch 'feature--isMention' into feat-tag-functions

This commit is contained in:
Usoka 2021-05-02 21:35:48 +12:00
commit 541a93e9ce

View file

@ -203,7 +203,7 @@ export const TagsPlugin = zeppelinGuildPlugin<TagsPluginType>()("tags", {
return ""; return "";
} }
if (input.match(/^<(?:@(?:!|&)?|#)\d+>$/)) { if (input.match(/^<(?:@[!&]?|#)\d+>$/)) {
return input; return input;
} }
@ -217,6 +217,14 @@ export const TagsPlugin = zeppelinGuildPlugin<TagsPluginType>()("tags", {
return ""; return "";
}, },
isMention: input => {
if (typeof input !== "string") {
return "";
}
return input.match(/^<(?:@[!&]?|#)\d+>$/);
},
}; };
for (const [name, fn] of Object.entries(state.tagFunctions)) { for (const [name, fn] of Object.entries(state.tagFunctions)) {