I'm using react-highlight-words library. I want to highlight text considering line break.
Input string: "Contrary to popular belief, Lorem Ipsum is not simply random text." Search string: "Contrary to popular belief, Lorem Ipsum is not simply random text."
Demo
1.4m articles
1.4m replys
5 comments
57.0k users