Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalise annotations on AnnotatedIOBuffer read #53801

Conversation

tecosaur
Copy link
Contributor

In the batch of polishing I'm currently working on (see also: #53715, #53794, #53800), this seems like another tweak worth making.

See the commit message for more details.

It is easy to come across situations where content with the same styling
is consecutively written to an AnnotatedIOBuffer, resulting in what
could be one region with a certain style being represented with many
identical regions instead. This is entirely valid, and handled
correctly, but it is much nicer in a number of respects if any such
regions are consolidated.

The annotatedstring_optimize! function does exactly this, and so we
apply it to the AnnotatedString result when reading from an
AnnotatedIOBuffer.
@tecosaur tecosaur added the domain:strings "Strings!" label Mar 21, 2024
@tecosaur
Copy link
Contributor Author

tecosaur commented Apr 2, 2024

Let me know if I'm being too ambitious, but I'm going to speculatively tag this with backport-1.11 since it (IMO) improves the state of this feature in the 1.11 release.

@tecosaur tecosaur added backport 1.11 Change should be backported to release-1.11 status:awaiting review PR is complete and seems ready to merge. Has tests and news/compat if needed. CI failures unrelated. labels Apr 2, 2024
@KristofferC KristofferC mentioned this pull request Apr 9, 2024
41 tasks
@KristofferC KristofferC mentioned this pull request Apr 17, 2024
59 tasks
@tecosaur tecosaur removed status:awaiting review PR is complete and seems ready to merge. Has tests and news/compat if needed. CI failures unrelated. backport 1.11 Change should be backported to release-1.11 labels Apr 27, 2024
@tecosaur
Copy link
Contributor Author

After a long chat with @LilithHafner, we're going to be taking a different approach to this. A superseding PR should be up shortly.

@tecosaur tecosaur closed this Apr 27, 2024
@tecosaur tecosaur deleted the normalise-annots-when-reading-annio branch April 27, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:strings "Strings!"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant