Bold email mentions in comment section (#5879)
This commit is contained in:
parent
92f288bc2f
commit
389739b5bb
1 changed files with 2 additions and 2 deletions
|
|
@ -310,9 +310,9 @@ frappe.ui.form.Timeline = Class.extend({
|
|||
// bold @mentions
|
||||
if(c.comment_type==="Comment" &&
|
||||
// avoid adding <b> tag a 2nd time
|
||||
!c.content_html.match(/(^|\W)<b>(@\w+)<\/b>/)
|
||||
!c.content_html.match(/(^|\W)<b>(@[^\s]+)<\/b>/)
|
||||
) {
|
||||
c.content_html = c.content_html.replace(/(^|\W)(@\w+)/g, "$1<b>$2</b>");
|
||||
c.content_html = c.content_html.replace(/(^|\W)(@[^\s]+)/g, "$1<b>$2</b>");
|
||||
}
|
||||
|
||||
if (this.is_communication_or_comment(c)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue