File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments