We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I stumbled upon an error while working with something similar to styled"𝟏{red:x}":
styled"𝟏{red:x}"
julia> styled"𝟏{red:x}" "Error showing value of type Base.AnnotatedString{String}: ERROR: StringIndexError: invalid index [4], valid nearby indices [1]=>'𝟏', [5]=>'x' Stacktrace: [1] string_index_err(s::String, i::Int64) @ Base ./strings/string.jl:12 [2] SubString{String}(s::String, i::Int64, j::Int64) @ Base ./strings/substring.jl:35 [3] SubString(s::String, i::Int64, j::Int64) @ Base ./strings/substring.jl:49 [4] SubString(s::String, r::UnitRange{Int64}) @ Base ./strings/substring.jl:52 [5] iterate(si::StyledStrings.RegionIterator{String}, i::Int64) @ StyledStrings ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/StyledStrings/src/regioniterator.jl:13 [6] iterate @ ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/StyledStrings/src/regioniterator.jl:12 [inlined] [7] _ansi_writer(io::IOContext{Base.TTY}, s::Base.AnnotatedString{String}, string_writer::StyledStrings.var"#20#21"{Tuple{}, Tuple{Char, Char}}) @ StyledStrings ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/StyledStrings/src/io.jl:233 [8] escape_string @ ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/StyledStrings/src/io.jl:266 [inlined] [9] print_quoted @ ./strings/io.jl:471 [inlined] [10] show @ ./strings/io.jl:197 [inlined] [11] show(io::IOContext{Base.TTY}, ::MIME{Symbol("text/plain")}, s::Base.AnnotatedString{String}) @ Base ./strings/annotated.jl:186 [...] julia> versioninfo() Julia Version 1.12.0-DEV.1093 Commit adb323f1b51 (2024-08-25 10:41 UTC) Build Info: Official https://julialang.org release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700H WORD_SIZE: 64 LLVM: libLLVM-18.1.7 (ORCJIT, alderlake) Threads: 20 default, 0 interactive, 20 GC (on 20 virtual cores) Environment: JULIA_INFO_COLOR = green JULIA_PKG_USE_CLI_GIT = true
It worked fine at some point (fairly early after the introduction of StyledStrings), then a change seems to have broken it.
The text was updated successfully, but these errors were encountered:
Thanks for the report Cedric! I'm unfortunately busy for the next ~week or so, but I'll give this a look soon.
Sorry, something went wrong.
thisind
I had to dig into region iteration for some other stuff, and then had an idea what was up in this issue. Feel free to take a look at #86 :)
Successfully merging a pull request may close this issue.
I stumbled upon an error while working with something similar to
styled"𝟏{red:x}"
:It worked fine at some point (fairly early after the introduction of StyledStrings), then a change seems to have broken it.
The text was updated successfully, but these errors were encountered: