From 389739b5bb2269ea4ae34602a8b5251fa9e093a7 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Mon, 30 Jul 2018 12:01:46 +0530 Subject: [PATCH] Bold email mentions in comment section (#5879) --- frappe/public/js/frappe/form/footer/timeline.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/form/footer/timeline.js b/frappe/public/js/frappe/form/footer/timeline.js index 177d168fb5..7c760b80a3 100644 --- a/frappe/public/js/frappe/form/footer/timeline.js +++ b/frappe/public/js/frappe/form/footer/timeline.js @@ -310,9 +310,9 @@ frappe.ui.form.Timeline = Class.extend({ // bold @mentions if(c.comment_type==="Comment" && // avoid adding tag a 2nd time - !c.content_html.match(/(^|\W)(@\w+)<\/b>/) + !c.content_html.match(/(^|\W)(@[^\s]+)<\/b>/) ) { - c.content_html = c.content_html.replace(/(^|\W)(@\w+)/g, "$1$2"); + c.content_html = c.content_html.replace(/(^|\W)(@[^\s]+)/g, "$1$2"); } if (this.is_communication_or_comment(c)) {