From 3eff28ac0d1cb02f480e9335dc13c1c2b814e459 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 5 Feb 2012 13:29:21 +0100 Subject: [PATCH] Don't strip color codes with ANSI escape code remover --- lib/vagrant/util/ansi_escape_code_remover.rb | 1 - test/unit/vagrant/util/ansi_escape_code_remover_test.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/vagrant/util/ansi_escape_code_remover.rb b/lib/vagrant/util/ansi_escape_code_remover.rb index 2fadb6088..3e89515ad 100644 --- a/lib/vagrant/util/ansi_escape_code_remover.rb +++ b/lib/vagrant/util/ansi_escape_code_remover.rb @@ -15,7 +15,6 @@ module Vagrant matchers = [/\e\[\d*[ABCD]/, # Matches things like \e[4D /\e\[(\d*;)?\d*[HF]/, # Matches \e[1;2H or \e[H /\e\[(s|u|2J|K)/, # Matches \e[s, \e[2J, etc. - /\e\[(\d*;){0,2}\d*m/, # Matches color escapes: \e[32m /\e\[=\d*[hl]/, # Matches \e[=24h /\e\[\?[1-9][hl]/, # Matches \e[?2h /\e\[20[hl]/, # Matches \e[20l] diff --git a/test/unit/vagrant/util/ansi_escape_code_remover_test.rb b/test/unit/vagrant/util/ansi_escape_code_remover_test.rb index bd8c102d3..8c6e3bcfd 100644 --- a/test/unit/vagrant/util/ansi_escape_code_remover_test.rb +++ b/test/unit/vagrant/util/ansi_escape_code_remover_test.rb @@ -11,7 +11,6 @@ describe Vagrant::Util::ANSIEscapeCodeRemover do it "should remove ANSI escape codes" do klass.remove_ansi_escape_codes("\e[Hyo").should == "yo" - klass.remove_ansi_escape_codes("\e[38myo").should == "yo" end end