mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
add workaround for Coderay object literals
This commit is contained in:
parent
2d72344673
commit
c544c1d699
1 changed files with 5 additions and 1 deletions
|
@ -32,7 +32,11 @@ class Pry
|
|||
stringified = "#<#{klass}:0x#{value.__id__.to_s(16)}>"
|
||||
end
|
||||
|
||||
Helpers::BaseHelpers.stagger_output("=> #{Helpers::BaseHelpers.colorize_code(stringified)}", output)
|
||||
nonce = rand(0x100000000).to_s(16) # whatever
|
||||
|
||||
colorized = Helpers::BaseHelpers.colorize_code(stringified.gsub(/#</, "%<#{nonce}"))
|
||||
|
||||
Helpers::BaseHelpers.stagger_output("=> #{colorized.gsub(/%<(.*?)#{nonce}/, '#<\1')}", output)
|
||||
end
|
||||
|
||||
# may be convenient when working with enormous objects and
|
||||
|
|
Loading…
Reference in a new issue