From 3a588fbc18bb990e07e656a41d2f858fb9dc25e2 Mon Sep 17 00:00:00 2001 From: Pat Lathem Date: Sun, 25 Oct 2015 14:09:09 -0500 Subject: Fix highlighting of trailing punctuation for own username --- web/react/utils/text_formatting.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web') diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index c49bdf916..e47aca39b 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -140,8 +140,9 @@ function autolinkAtMentions(text, tokens) { const alias = `MM_ATMENTION${index}`; tokens.set(alias, { - value: `${mention}${extraText}`, - originalText: mention + value: `${mention}`, + originalText: mention, + extraText }); return alias; } @@ -194,10 +195,9 @@ function highlightCurrentMentions(text, tokens) { const newAlias = `MM_SELFMENTION${index}`; newTokens.set(newAlias, { - value: `${alias}`, + value: `${alias}` + token.extraText, originalText: token.originalText }); - output = output.replace(alias, newAlias); } } -- cgit v1.2.3-1-g7c22