Skip to content

Commit

Permalink
Limit size of show (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
tshort authored Jan 11, 2022
1 parent 789439f commit 7388355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Eyeball"
uuid = "ce36242b-ad83-4f84-8519-47cd8aeefd60"
authors = ["Tom Short <[email protected]>"]
version = "0.4.2"
version = "0.4.3"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
4 changes: 2 additions & 2 deletions src/Eyeball.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ tostring(pn, obj)
Returns a string with the text representation of `obj` with key `pn`.
"""
function tostring(key, value)
io = IOContext(IOBuffer(), :compact => true, :limit => true, :color => true)
io = IOContext(IOBuffer(), :compact => true, :limit => true, :color => true, :displaysize => (3,200))
show(io, value)
svalue = String(take!(io.io))
string(style(string(key), color = :cyan), ": ",
Expand All @@ -379,7 +379,7 @@ function tostring(key, value::ExpandPlaceholder)
end

function tostring(key, x::Summarize)
io = IOContext(IOBuffer(), :compact => true, :limit => true, :color => true)
io = IOContext(IOBuffer(), :compact => true, :limit => true, :color => true, :displaysize => (3,200))
show(io, x)
svalue = String(take!(io.io))
string(style(string(key), color = :cyan), ": ",
Expand Down

0 comments on commit 7388355

Please sign in to comment.