Skip to content

Conversation

tecosaur
Copy link
Member

For consistency, calling annotations on an AnnotatedString, whether an
index or range is specified, now always returns a vector of
region-annotation tuples.

Previously, when an index was specified, only the annotations would be
returned. Thus, code that relies on this previous behaviour must now
apply last to each element of the returned vector.

For consistency, calling `annotations` on an AnnotatedString, whether an
index or range is specified, now always returns a vector of
region-annotation tuples.

Previously, when an index was specified, only the annotations would be
returned. Thus, code that relies on this previous behaviour must now
apply `last` to each element of the returned vector.
vtjnash pushed a commit to JuliaLang/julia that referenced this pull request Feb 12, 2024
This is a generally nice simplification, that tweaks the `annotations`
API.

It also requires the adjustment in
JuliaLang/StyledStrings.jl#38 to be made, hence
the bump.
@tecosaur tecosaur merged commit e0ca0f8 into main Feb 12, 2024
@tecosaur tecosaur deleted the adjust-to-changed-annot-fn branch February 12, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant