Bold email mentions in comment section (#5879)

This commit is contained in:
Zarrar 2018-07-30 12:01:46 +05:30 committed by Faris Ansari
parent 92f288bc2f
commit 389739b5bb

View file

@ -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)) {