Skip to content

Commit

Permalink
Handle multiple line CSS variable deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Sep 25, 2016
1 parent 7a89f38 commit f378c0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/sass_spec/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def _extract_error_message(error, options)
break
end
if (line =~ /DEPRECATION WARNING/)
if line.rstrip.end_with?(":")
if _is_multiple_line_error_message(line)
error_message = line.rstrip + "\n"
consume_next_line = true
next
Expand All @@ -629,6 +629,11 @@ def _extract_error_message(error, options)
_clean_debug_path(error_message.rstrip, options[:spec_directory])
end

def _is_multiple_line_error_message(line)
line.rstrip.end_with?(":") ||
line.rstrip.end_with?("Instead of being parsed as")
end

def _clean_debug_path(error, spec_dir)
spec_dir = File.expand_path(spec_dir)
url = spec_dir.gsub(/\\/, '\/')
Expand Down

0 comments on commit f378c0d

Please # to comment.