Skip to content

Commit 3a80ac8

Browse files
authored
Merge pull request #78 from visr/patch-1
define ncodeunits for ShowWith
2 parents 9ef589a + b54da34 commit 3a80ac8

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)