Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentation added with limit and multiline=false #346

Open
bmon opened this issue Sep 6, 2018 · 0 comments
Open

indentation added with limit and multiline=false #346

bmon opened this issue Sep 6, 2018 · 0 comments

Comments

@bmon
Copy link

bmon commented Sep 6, 2018

When using multiline and limit at the same time, the limit method prints extra indentation, within the single line of output. When multiline is disabled, limit should probably print the zipped (..) item with zero indentation.

AwesomePrint.defaults = {
  :multiline => false,
  :limit => 3,
}

result:

[1] pry(main)> {:a => 'a', :b => 'b', :c => 'c', :d => 'd', :e => 'e'}
{ :a => "a",     :b => "b" .. :e => "e" }

[2] pry(main)> {:a => { :a => {:a => 'a', :b => 'b', :c => 'c', :d => 'd', :e => 'e'}}}
{ :a => { :a => { :a => "a",             :b => "b" .. :e => "e" } } }

expected:

[1] pry(main)> {:a => 'a', :b => 'b', :c => 'c', :d => 'd', :e => 'e'}
{ :a => "a", :b => "b" .. :e => "e" }

[2] pry(main)> {:a => { :a => {:a => 'a', :b => 'b', :c => 'c', :d => 'd', :e => 'e'}}}
{ :a => { :a => { :a => "a", :b => "b" .. :e => "e" } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant