bvaughn/react-highlight-words

Adjacent active chunks are handled as a single chunk

Open

#68 opened on Dec 4, 2018

 (2 comments) (0 reactions) (0 assignees)JavaScript (176 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (2,303 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

See this example: https://codesandbox.io/s/7j2njo9l2q.

searchWords={["e"]}
textToHighlight="sleep"
activeIndex={0} 

highlights both ee instead of just the first e. With activeIndex={1} nothing gets highlighted.

Contributor guide