wave icon indicating copy to clipboard operation
wave copied to clipboard

Let ui.text_annotator respect \n and \r in text

Open pascal-pfeiffer opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe

Currently, ui.text_annotator strips off any \n \r in the text prior to rendering. This makes formatted texts to appear in a single line and additionally results in wrong character level offsets for the annotations (possible bug).

Describe the solution you'd like

Let ui.text_annotator respect \n and \r in text for rendering and character offset calculations. To help the annotation process, this could be made visible by showing acutal \n or invisible by adding newlines.

The issue probably extends to all invisible characters.

pascal-pfeiffer avatar Apr 18 '22 10:04 pascal-pfeiffer

+1 for this, very important feature to polish the component.

vopani avatar May 18 '22 06:05 vopani

Thanks for the request! @pascal-pfeiffer @vopani could you please check whether my implementation here is as you imagine?

marek-mihok avatar Sep 02 '22 15:09 marek-mihok