bvaughn / bvaughn/react-highlight-words

autoEscape not working when one of the searchWords is regex

Open
#64 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.3k
Forks
175
PR merge metrics
No merged PRs in 30d

Description

When `autoEscape` is set to true and (at least) one of the elements in `searchWords` array is regex, the following exception is raised:

```
TypeError
str.replace is not a function
```

Example: https://codesandbox.io/s/20p3zk380n

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.