diff --git a/src/Dimensions/show.jl b/src/Dimensions/show.jl index d4a23359a..efc6ec6eb 100644 --- a/src/Dimensions/show.jl +++ b/src/Dimensions/show.jl @@ -7,7 +7,6 @@ function Base.show(io::IO, mime::MIME"text/plain", dims::DimTuple) print(io, ", ") show(ctx, mime, d) end - println(io) return 0 else # Dims get a line each haskey(io, :inset) && println(io) @@ -23,7 +22,6 @@ function Base.show(io::IO, mime::MIME"text/plain", dims::DimTuple) print(io, inset) show(ctx, mime, d) end - println(io) return lines end end diff --git a/src/array/show.jl b/src/array/show.jl index 73dc786c7..cbd70abb1 100644 --- a/src/array/show.jl +++ b/src/array/show.jl @@ -16,7 +16,9 @@ function Base.show(io::IO, mime::MIME"text/plain", A::AbstractDimArray) summary(io, A) print_name(io, name(A)) lines += Dimensions.print_dims(io, mime, dims(A)) + !(isempty(dims(A)) || isempty(refdims(A))) && println(io) lines += Dimensions.print_refdims(io, mime, refdims(A)) + println(io) # Printing the array data is optional, subtypes can # show other things here instead.