Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/git-hack/commit_line_builder.rb

Overview

git log 数据可能被加色,本补丁删除加色信息

Instance Method Summary collapse

Instance Method Details

#uncolorizeObject



7
8
9
10
# File 'lib/git-hack/commit_line_builder.rb', line 7

def uncolorize
	# BUG: 在bin/git* 下运行可以去掉,但是安装gem 后就不能了????
	self.gsub(/\e\[(\d+)*m/,"")  # 以除 \e[30e]	 颜色标记
end