Skip to content

Commit

Permalink
Merge pull request sj26#59 from qbart/master
Browse files Browse the repository at this point in the history
Fix #strip_diff_colors output for CircleCI
  • Loading branch information
sj26 authored May 30, 2018
2 parents 66653b6 + bf24f50 commit 0ecd30d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rspec_junit_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def escape(text)
text.to_s.encode(Encoding::UTF_8).gsub(ILLEGAL_REGEXP, ILLEGAL_REPLACEMENT).gsub(DISCOURAGED_REGEXP, DISCOURAGED_REPLACEMENTS)
end

STRIP_DIFF_COLORS_BLOCK_REGEXP = /^ ( [ ]* ) Diff: (?: \e\[0m )? (?: \n \1 \e\[\d+m .* )* /x
STRIP_DIFF_COLORS_CODES_REGEXP = /\e\[\d+m/
STRIP_DIFF_COLORS_BLOCK_REGEXP = /^ ( [ ]* ) Diff: (?: \e\[0m )? (?: \n \1 \e\[(\d+;?){1,3}m .* )* /x
STRIP_DIFF_COLORS_CODES_REGEXP = /\e\[(\d+;?){1,3}m/

def strip_diff_colors(string)
# XXX: RSpec diffs are appended to the message lines fairly early and will
Expand Down

0 comments on commit 0ecd30d

Please sign in to comment.