garysieling / garysieling/jquery-highlighttextarea
Replace mechanism is broken causing misplaced highlights.
- Dominant language
- JavaScript
- Stars
- 157
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
As you can see from the code, the 'highlight' method replaces each word instance with a element which has a different background making the word highlighted.
The problem is that the 'replace' mechanism is broken and it replaces the words even if they are inside an html element, thus messing up the UI entirely.
So if, for example, one of the words is "background", it would inject a element instead of every "background" including the one in the style of the previous element.
See video and screenshot:


Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.