module Jekyll::Utils::Ansi
Constants
- COLORS
- ESCAPE
- MATCH
Public Instance Methods
Source
# File lib/jekyll/utils/ansi.rb, line 39 def reset(str = "") @ansi_reset ||= format("%c[0m", 27) "#{@ansi_reset}#{str}" end
Reset the color back to the default color so that you do not leak any colors when you move onto the next line. This is probably normally used as part of a wrapper so that we don’t leak colors.
Source
# File lib/jekyll/utils/ansi.rb, line 25 def strip(str) str.gsub MATCH, "" end
Strip ANSI from the current string. It also strips cursor stuff, well some of it, and it also strips some other stuff that a lot of the other ANSI strippers don’t.