-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
AnnotatedString: wrong join() result with other string types #55198
Comments
julia> using InlineStrings
julia> str = Base.AnnotatedString(InlineString("abc"))
"abc"
julia> sprint(print, str)
"\x03cba" The problem is that AnnotatedStrings thinks that |
tecosaur
added a commit
to JuliaLang/StyledStrings.jl
that referenced
this issue
Jul 25, 2024
As raised in <JuliaLang/julia#55198>, once we look at AbstractString types outside of Core/Base, their print methods can be meaningfully different to write + returning nothing. As such, instead of delegating printing to write, we need to call _ansi_writer asking it to use the print function.
tecosaur
added a commit
to JuliaLang/StyledStrings.jl
that referenced
this issue
Jul 25, 2024
As raised in <JuliaLang/julia#55198>, once we look at AbstractString types outside of Core/Base, their print methods can be meaningfully different to write + returning nothing. As such, instead of delegating printing to write, we need to call _ansi_writer asking it to use the print function.
This is fixed in JuliaLang/StyledStrings.jl#66, I'll let tests run then merge + bump + backport. |
tecosaur
added a commit
to JuliaLang/StyledStrings.jl
that referenced
this issue
Jul 25, 2024
As raised in <JuliaLang/julia#55198>, once we look at AbstractString types outside of Core/Base, their print methods can be meaningfully different to write + returning nothing. As such, instead of delegating printing to write, we need to call _ansi_writer asking it to use the print function.
tecosaur
added a commit
to JuliaLang/StyledStrings.jl
that referenced
this issue
Jul 25, 2024
As raised in <JuliaLang/julia#55198>, once we look at AbstractString types outside of Core/Base, their print methods can be meaningfully different to write + returning nothing. As such, instead of delegating printing to write, we need to call _ansi_writer asking it to use the print function.
tecosaur
added a commit
to JuliaLang/StyledStrings.jl
that referenced
this issue
Jul 25, 2024
As raised in <JuliaLang/julia#55198>, once we look at AbstractString types outside of Core/Base, their print methods can be meaningfully different to write + returning nothing. As such, instead of delegating printing to write, we need to call _ansi_writer asking it to use the print function.
#55461 updates the version of StyledStrings to include the fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In both 1.11rc and nightly:
The text was updated successfully, but these errors were encountered: