bvaughn / bvaughn/react-highlight-words
Adjacent active chunks are handled as a single chunk
Open
bug
help wanted
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 175
- PR merge metrics
- No merged PRs in 30d
Description
See this example: https://codesandbox.io/s/7j2njo9l2q.
```js
searchWords={["e"]}
textToHighlight="sleep"
activeIndex={0}
```
highlights both `ee` instead of just the first `e`. With `activeIndex={1}` nothing gets highlighted.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked CodeSandbox reproduction and the searchWords, textToHighlight, and activeIndex props shown in the issue. Trace how adjacent matches are grouped and how activeIndex selects one, then verify that activeIndex 0 highlights only the first “e” and activeIndex 1 highlights only the second.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100