mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
pry_class.rb: do not monkey-patch CodeRay anymore
The new CodeRay version (1.1.0) has changed its internal structure for terminal encoder colours. We could update our patch and apply the new syntax, but during the discussion with CodeRay's author we both agreed that the vanilla colour looks much more pleasant. So I decided to remove the patch altogether. The dark blue colour looks *really* awful on black background. See: https://github.com/rubychan/coderay/issues/154
This commit is contained in:
parent
83d99d6954
commit
022ca374af
1 changed files with 0 additions and 20 deletions
|
@ -377,26 +377,6 @@ Readline version #{ver} detected - will not auto_resize! correctly.
|
||||||
self.current_line = 1
|
self.current_line = 1
|
||||||
self.line_buffer = [""]
|
self.line_buffer = [""]
|
||||||
self.eval_path = "(pry)"
|
self.eval_path = "(pry)"
|
||||||
|
|
||||||
fix_coderay_colors
|
|
||||||
end
|
|
||||||
|
|
||||||
# To avoid mass-confusion, we change the default colour of "white" to
|
|
||||||
# "blue" enabling global legibility
|
|
||||||
def self.fix_coderay_colors
|
|
||||||
to_fix = if (CodeRay::Encoders::Terminal::TOKEN_COLORS rescue nil)
|
|
||||||
# CodeRay 1.0.0
|
|
||||||
CodeRay::Encoders::Terminal::TOKEN_COLORS
|
|
||||||
else
|
|
||||||
# CodeRay 0.9
|
|
||||||
begin
|
|
||||||
require 'coderay/encoders/term'
|
|
||||||
CodeRay::Encoders::Term::TOKEN_COLORS
|
|
||||||
rescue
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
to_fix[:comment] = "0;34" if to_fix
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Basic initialization.
|
# Basic initialization.
|
||||||
|
|
Loading…
Reference in a new issue