kevin91nl / text-highlighter

A Streamlit component for annotating text by text selecting.
MIT License
40 stars 4 forks source link

Highlighting adjacent span deletes the existing span #15

Open idc9 opened 1 week ago

idc9 commented 1 week ago

Thanks for making this package!

If I try to highlight an exactly adjacent span (first "[This is a n]ice package" then "[This is a n][ice] package") to an existing span the existing span is deleted. In other words. If you release the mouse at the very end/beginning of a span it registers as on the span and the sapn is deleted. I don't think this is intended behavior.

I'm using python 3.10.15 streamlit 1.40.0

I couldn't figure out the text-highlighter since text_highlighter.__version__ didn't work but I just downloaded it from pip.

linear[bot] commented 1 week ago

OVO-12 Highlighting adjacent span deletes the existing span