summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorPat Lathem <patl@codero.com>2015-10-25 14:09:09 -0500
committerPat Lathem <patl@codero.com>2015-10-25 14:09:09 -0500
commit3a588fbc18bb990e07e656a41d2f858fb9dc25e2 (patch)
treeaa6087e5e7c96de59d38345217805d4d43cda9b2 /web
parent80e0a8db1d70ca387c654d9ac6bded0fb1e352a6 (diff)
downloadchat-3a588fbc18bb990e07e656a41d2f858fb9dc25e2.tar.gz
chat-3a588fbc18bb990e07e656a41d2f858fb9dc25e2.tar.bz2
chat-3a588fbc18bb990e07e656a41d2f858fb9dc25e2.zip
Fix highlighting of trailing punctuation for own username
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/text_formatting.jsx8
1 files changed, 4 insertions, 4 deletions
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: `<a class='mention-link' href='#' data-mention='${username}'>${mention}</a>${extraText}`,
- originalText: mention
+ value: `<a class='mention-link' href='#' data-mention='${username}'>${mention}</a>`,
+ originalText: mention,
+ extraText
});
return alias;
}
@@ -194,10 +195,9 @@ function highlightCurrentMentions(text, tokens) {
const newAlias = `MM_SELFMENTION${index}`;
newTokens.set(newAlias, {
- value: `<span class='mention-highlight'>${alias}</span>`,
+ value: `<span class='mention-highlight'>${alias}</span>` + token.extraText,
originalText: token.originalText
});
-
output = output.replace(alias, newAlias);
}
}