[ruby/yarp] Better Node#pretty_print

Respect the current indentation

https://github.com/ruby/yarp/commit/068333ef49
This commit is contained in:
Kevin Newton 2023-09-19 12:30:48 -04:00 committed by git
parent a71001d341
commit 4da53fd3a7

View File

@ -307,7 +307,10 @@ module YARP
end
def pretty_print(q)
q.text(inspect.chomp)
q.seplist(inspect.chomp.each_line, -> { q.breakable }) do |line|
q.text(line.chomp)
end
q.current_group.break
end
end