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
2.1m questions
2.1m answers
60 comments
57.0k users