tags: fix config-defined tags not accepting arguments

This commit is contained in:
Miikka 2020-07-04 22:17:21 +03:00 committed by GitHub
parent b4e034e3d8
commit 5dca6c6cb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -408,7 +408,7 @@ export class TagsPlugin extends ZeppelinPlugin<TConfigSchema> {
const withoutPrefix = msg.data.content.slice(prefix.length);
for (const [tagName, tagBody] of Object.entries(category.tags)) {
const regex = new RegExp(`^${escapeStringRegexp(tagName)}(?:\s|$)`);
const regex = new RegExp(`^${escapeStringRegexp(tagName)}(?:\\s|$)`);
if (regex.test(withoutPrefix)) {
renderedTag = await this.renderSafeTagFromMessage(
msg.data.content,