Skip to content

Commit b54da34

Browse files
authored
define ncodeunits for ShowWith
To fix #77.
1 parent 9ef589a commit b54da34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/show.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ function Base.show(io::IO, x::ShowWith; kw...)
156156
end
157157
Base.alignment(io::IO, x::ShowWith) = alignment(io, x.val) .+ (2,0) # extra brackets
158158
Base.length(x::ShowWith) = length(string(x.val))
159+
Base.ncodeunits(x::ShowWith) = ncodeunits(string(x.val))
159160
Base.print(io::IO, x::ShowWith) = printstyled(io, string(x.val); x.nt...)
160161

161162
# For higher-dim printing, I just want change the [:, :, 1] things, add name/key,

0 commit comments

Comments
 (0)