Skip to content

Commit ee3a242

Browse files
A fix for "At" in Chat Pile
1 parent 7cd192c commit ee3a242

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

static/js/track-initializer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,13 @@ const trackInitializer = {
5757
const wordCountElement = document.getElementById(`wordCount${trackIndex}-${cleanedWord}`);
5858
const count = wordCountElement?.getAttribute(DOM_ATTRIBUTES.count) || 0;
5959

60+
const displayWord = originalWord.replace(/[\u200B-\u200D\uFEFF]/g, '');
6061
return `<span class="${DOM_CLASSES.word}"
6162
${DOM_ATTRIBUTES.word}="${cleanedWord}"
6263
${DOM_ATTRIBUTES.track}="${trackIndex}"
6364
${DOM_ATTRIBUTES.count}="${count}"
6465
onmouseover="highlightManager.toggleWordHighlight(this, true); tooltip.show(this)"
65-
onmouseout="highlightManager.toggleWordHighlight(this, false); tooltip.hide()">${originalWord}</span>`;
66+
onmouseout="highlightManager.toggleWordHighlight(this, false); tooltip.hide()">${displayWord}</span>`;
6667
},
6768

6869
attachWordCountListeners(trackElement) {

0 commit comments

Comments
 (0)