Skip to content

Commit

Permalink
fix multiline object coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Sep 26, 2012
1 parent d350493 commit b838e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Pry
colorized = Helpers::BaseHelpers.colorize_code(stringified.gsub(/#</, "%<#{nonce}"))

# avoid colour-leak from CodeRay and any of the users' previous output
colorized = colorized.sub(/(\n*)$/, "\e[0m\\1") if Pry.color
colorized = colorized.sub(/(\n*)\z/, "\e[0m\\1") if Pry.color

Helpers::BaseHelpers.stagger_output("=> #{colorized.gsub(/%<(.*?)#{nonce}/, '#<\1')}", output)
end
Expand Down

0 comments on commit b838e38

Please sign in to comment.