@jupyter/chat 0.22.0 → 0.22.1
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/lib/utils.js +2 -2
- package/package.json +1 -1
- package/src/utils.ts +2 -2
package/lib/utils.js
CHANGED
|
@@ -48,7 +48,7 @@ export function replaceMentionToSpan(content, user) {
|
|
|
48
48
|
}
|
|
49
49
|
const mention = '@' + user.mention_name;
|
|
50
50
|
const regex = new RegExp(mention, 'g');
|
|
51
|
-
const mentionEl = `<span class="${MENTION_CLASS}"
|
|
51
|
+
const mentionEl = `<span class="${MENTION_CLASS}"> ${mention} </span>`;
|
|
52
52
|
return content.replace(regex, mentionEl);
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
@@ -62,7 +62,7 @@ export function replaceSpanToMention(content, user) {
|
|
|
62
62
|
return content;
|
|
63
63
|
}
|
|
64
64
|
const mention = '@' + user.mention_name;
|
|
65
|
-
const mentionEl = `<span class="${MENTION_CLASS}"
|
|
65
|
+
const mentionEl = `<span class="${MENTION_CLASS}"> ${mention} </span>`;
|
|
66
66
|
const regex = new RegExp(mentionEl, 'g');
|
|
67
67
|
return content.replace(regex, mention);
|
|
68
68
|
}
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -62,7 +62,7 @@ export function replaceMentionToSpan(content: string, user: IUser): string {
|
|
|
62
62
|
}
|
|
63
63
|
const mention = '@' + user.mention_name;
|
|
64
64
|
const regex = new RegExp(mention, 'g');
|
|
65
|
-
const mentionEl = `<span class="${MENTION_CLASS}"
|
|
65
|
+
const mentionEl = `<span class="${MENTION_CLASS}"> ${mention} </span>`;
|
|
66
66
|
return content.replace(regex, mentionEl);
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -77,7 +77,7 @@ export function replaceSpanToMention(content: string, user: IUser): string {
|
|
|
77
77
|
return content;
|
|
78
78
|
}
|
|
79
79
|
const mention = '@' + user.mention_name;
|
|
80
|
-
const mentionEl = `<span class="${MENTION_CLASS}"
|
|
80
|
+
const mentionEl = `<span class="${MENTION_CLASS}"> ${mention} </span>`;
|
|
81
81
|
const regex = new RegExp(mentionEl, 'g');
|
|
82
82
|
return content.replace(regex, mention);
|
|
83
83
|
}
|