nodebb-plugin-mentions 4.7.3 → 4.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint.config.mjs +10 -0
- package/library.js +2 -2
- package/package-lock.json +4283 -0
- package/package.json +8 -5
- package/.eslintrc +0 -3
- package/static/.eslintrc +0 -3
package/library.js
CHANGED
|
@@ -473,7 +473,7 @@ Mentions.parseRaw = async (content, type = 'default') => {
|
|
|
473
473
|
// Again, cleaning up lookaround leftover bits
|
|
474
474
|
const atIndex = match.indexOf('@');
|
|
475
475
|
const plain = match.slice(0, atIndex);
|
|
476
|
-
match = match.slice(atIndex);
|
|
476
|
+
match = match.slice(atIndex + 1);
|
|
477
477
|
if (user && user.uid) {
|
|
478
478
|
switch (Mentions._settings.display) {
|
|
479
479
|
case 'fullname':
|
|
@@ -489,7 +489,7 @@ Mentions.parseRaw = async (content, type = 'default') => {
|
|
|
489
489
|
if (type === 'markdown') {
|
|
490
490
|
str = `[${match}](${nconf.get('url')}${url})`;
|
|
491
491
|
} else {
|
|
492
|
-
str = `<a class="plugin-mentions-${mentionType} plugin-mentions-a" href="${url}"
|
|
492
|
+
str = `<a class="plugin-mentions-${mentionType} plugin-mentions-a" href="${nconf.get('relative_path')}${url}">${!Mentions._settings.display ? '@' : ''}<bdi>${match}</bdi></a>`;
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
return plain + str;
|