mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-20 16:25:03 +00:00
Merge branch 'feature--isMention' into feat-tag-functions
This commit is contained in:
commit
541a93e9ce
1 changed files with 9 additions and 1 deletions
|
@ -203,7 +203,7 @@ export const TagsPlugin = zeppelinGuildPlugin<TagsPluginType>()("tags", {
|
|||
return "";
|
||||
}
|
||||
|
||||
if (input.match(/^<(?:@(?:!|&)?|#)\d+>$/)) {
|
||||
if (input.match(/^<(?:@[!&]?|#)\d+>$/)) {
|
||||
return input;
|
||||
}
|
||||
|
||||
|
@ -217,6 +217,14 @@ export const TagsPlugin = zeppelinGuildPlugin<TagsPluginType>()("tags", {
|
|||
|
||||
return "";
|
||||
},
|
||||
|
||||
isMention: input => {
|
||||
if (typeof input !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return input.match(/^<(?:@[!&]?|#)\d+>$/);
|
||||
},
|
||||
};
|
||||
|
||||
for (const [name, fn] of Object.entries(state.tagFunctions)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue