mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Merge pull request #717 from lloeki/fix_multiline_object_coloring
Pry <#.*> coloring falls apart when it has multiple lines
This commit is contained in:
commit
24d9e486d7
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue