I am highlighting matching terms in lines of text. For my layout, each line needs to be rendered separately, so I have one <Highlighter> per line. Furthermore, I need to highlight a term even if it spans more than a single line. To do this, I need to pass the previous and the next line as additional context for findChunks to work with. How can this be achieved?
I am highlighting matching terms in lines of text. For my layout, each line needs to be rendered separately, so I have one
<Highlighter>
per line. Furthermore, I need to highlight a term even if it spans more than a single line. To do this, I need to pass the previous and the next line as additional context forfindChunks
to work with. How can this be achieved?