From 3fab35e63140dccd4f8c28819d19049825d10e1b Mon Sep 17 00:00:00 2001 From: TEC Date: Thu, 28 Dec 2023 21:04:05 +0800 Subject: [PATCH] Fix showing AnnotatedChar with colour This method was overlooked when the AnnotatedString(::String, ::Vector{Pair{Symbol, <:Any}}) constructor was removed. --- src/io.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io.jl b/src/io.jl index d1fcbb52..96ee2aeb 100644 --- a/src/io.jl +++ b/src/io.jl @@ -268,7 +268,7 @@ function show(io::IO, c::AnnotatedChar) if get(io, :color, false) == true out = IOBuffer() show(out, c.char) - print(io, ''', AnnotatedString(String(take!(out)[2:end-1]), c.annotations), ''') + print(io, ''', AnnotatedString(String(take!(out)[2:end-1]), map(a -> (1:ncodeunits(c), a), c.annotations)), ''') else show(io, c.char) end