helior / react-highlighter

:high_brightness: Highlight text using React
MIT License
157 stars 42 forks source link

Highlighter breaks when searching for special characters #53

Open mshibl opened 6 years ago

mshibl commented 6 years ago

First, thank you for building this neat react component.

I've found a bug where passing any special character breaks the internal regex matching in Highlighter Component.

Here's a demo demonstrating the bug: https://codesandbox.io/s/204r9kz6lj

ViktorSoroka07 commented 5 years ago

This is rather a bug of react-highlight-words and not of the react-highlighter current one.