diff --git a/.rubocop.yml b/.rubocop.yml index 0e65424c..56b29b9c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -62,7 +62,6 @@ AllCops: - lib/jekyll/tags/post_url.rb - lib/jekyll/theme.rb - lib/jekyll/url.rb - - lib/jekyll/utils/ansi.rb - lib/jekyll/utils/platforms.rb - lib/jekyll/utils.rb - lib/jekyll.rb diff --git a/lib/jekyll/utils/ansi.rb b/lib/jekyll/utils/ansi.rb index 933b4323..715cb277 100644 --- a/lib/jekyll/utils/ansi.rb +++ b/lib/jekyll/utils/ansi.rb @@ -8,17 +8,17 @@ module Jekyll extend self ESCAPE = format("%c", 27) - MATCH = /#{ESCAPE}\[(?:\d+)(?:;\d+)*(j|k|m|s|u|A|B|G)|\e\(B\e\[m/ix.freeze + MATCH = /#{ESCAPE}\[(?:\d+)(?:;\d+)*(j|k|m|s|u|A|B|G)|\e\(B\e\[m/ix COLORS = { - :red => 31, - :green => 32, - :black => 30, + :red => 31, + :green => 32, + :black => 30, :magenta => 35, - :yellow => 33, - :white => 37, - :blue => 34, - :cyan => 36 - } + :yellow => 33, + :white => 37, + :blue => 34, + :cyan => 36 + }.freeze # 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