Open tfielding-sourcepoint opened 1 year ago
When I designed this, I had a few choices:
<A>012345</A>
<A>012345</A><B>5</B>
<A>0123</A><A><B>45</B></A><B>6</B>
I chose to keep it simple and just not support overlapping highlights.
I'm open for feature requests (perhaps an overlap property). But I'd not want it to get too complex.
Since the range is exclusive of the last, it was for:
highlight={[ [0, 6], [4,7] ]}
@bonafideduck Please add overlapping feature 🙏
Consider the following example:
<HighlightWithinTextarea highlight={[ [0, 5], [4,6] ]} ... />
In this example, the [4,6] highlight will not render highlighted because it seems to be overlapping with the first [0,5] entry.