Skip to content

Commit

Permalink
Fix highlighting of trailing punctuation for own username
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Lathem committed Oct 25, 2015
1 parent 80e0a8d commit 3a588fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/react/utils/text_formatting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 3a588fb

Please sign in to comment.