Convert a TextWithEntities into a tl.TypeRichText tree (as used in page blocks / instant view).
Overlapping entities are handled by splitting the text at every entity boundary and nesting the wrappers per-segment, so the result may be more fragmented than the input, but always renders identically.
Convert a TextWithEntities into a tl.TypeRichText tree (as used in page blocks / instant view).
Overlapping entities are handled by splitting the text at every entity boundary and nesting the wrappers per-segment, so the result may be more fragmented than the input, but always renders identically.