summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2022-04-21 20:55:42 -0300
committerGitHub <noreply@github.com>2022-04-21 20:55:42 -0300
commit8bbbd11dbcf35f38c0a96ea069256a6ece8298f5 (patch)
treee1addf0c79a7d86cc58383cc23aea3619b465d3f /lib
parent6c531b9093a18a81155cadaf31f77944c495b44b (diff)
parentfd50ffbdc68589d1cd8072fc7b7e01ab63fe3731 (diff)
downloadpry-8bbbd11dbcf35f38c0a96ea069256a6ece8298f5.tar.gz
Merge pull request #2235 from pry/revert-2154-patch-1
Revert "Escape non-printing characters"
Diffstat (limited to 'lib')
-rw-r--r--lib/pry/helpers/text.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pry/helpers/text.rb b/lib/pry/helpers/text.rb
index e004c961..4ccedf83 100644
--- a/lib/pry/helpers/text.rb
+++ b/lib/pry/helpers/text.rb
@@ -21,20 +21,20 @@ class Pry
COLORS.each_pair do |color, value|
define_method color do |text|
- "\001\033[0;#{30 + value}m\002#{text}\001\033[0m\002"
+ "\033[0;#{30 + value}m#{text}\033[0m"
end
define_method "bright_#{color}" do |text|
- "\001\033[1;#{30 + value}m\002#{text}\001\033[0m\002"
+ "\033[1;#{30 + value}m#{text}\033[0m"
end
COLORS.each_pair do |bg_color, bg_value|
define_method "#{color}_on_#{bg_color}" do |text|
- "\001\033[0;#{30 + value};#{40 + bg_value}m\002#{text}\001\033[0m\002"
+ "\033[0;#{30 + value};#{40 + bg_value}m#{text}\033[0m"
end
define_method "bright_#{color}_on_#{bg_color}" do |text|
- "\001\033[1;#{30 + value};#{40 + bg_value}m\002#{text}\001\033[0m\002"
+ "\033[1;#{30 + value};#{40 + bg_value}m#{text}\033[0m"
end
end
end
@@ -52,7 +52,7 @@ class Pry
# @param [String, #to_s] text
# @return [String] _text_
def bold(text)
- "\001\e[1m\002#{text}\001\e[0m\002"
+ "\e[1m#{text}\e[0m"
end
# Returns `text` in the default foreground colour.