Skip to content

More compact show method when compact=true #204

@sethaxen

Description

@sethaxen

Current behavior when showing in compact mode is:

julia> a, b = sort(randn(2));
julia> show(stdout, MIME("text/plain"), a)
0.320887685039538
julia> show(stdout, MIME("text/plain"), a..b)
0.320887685039538 .. 0.5714203688563335
julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), a)
0.320888
julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), a..b)
0.320888 .. 0.57142

This is great, only for the last case, I wish the spaces before and after the .. were eliminated, so that we would instead have

julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), a..b)
0.320888..0.57142

Similarly, I would want spaces eliminated for compact printing of OpenIntervals:

julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), OpenInterval(a, b))
0.320888..0.57142(open)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions