Closed kaungmyatlwin closed 2 years ago
Hi @sergei-startsev , thanks for replying. I've added two test cases f8d34a1b4be84b12804933bd01537c20f7e8154f for unhighlightTag
to test if they can be functional/class component.
Please have a look.
@sergei-startsev Rebased against master. Can you check?
@kaungmyatlwin your changes will be included into the next release.
@sergei-startsev Hi there! Would you mind creating a new release with this change? Thanks!
@JeffreyATW check out https://www.npmjs.com/package/react-highlight-words/v/0.20.0
Description
This PR adds ability to render custom HTML tags / React Nodes instead of defaulting to
<span>
element.Problem
Defaulting to
<span>
is a good idea and must have, but sometimes we have edge cases where you need to pass custom React nodes in order to provide additional functionalities. Please see the Use Case below.Use Case
Should be able to render
<a>
tags whenever necessary or pass React components (such as<Linkify>
: https://github.com/tasti/react-linkify) to render the links properly.