Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron committed Jun 21, 2023
1 parent 4ff8615 commit 7d467d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/css/css_var_fallback_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def test_css_rules_all_contain_fallbacks
# 2. Load file and run regex on it which checks for any CSS var containing new color terms
regex = /var\(--(shadow|borderColor|bgColor|fgColor|iconColor)[^),]*\)\s*(,|;|\s)/

missing = [].tap do |missing|
css_file.contents.scan(regex) do |match|
missing = [].tap do |results|
css_file.contents.scan(regex) do
start_pos, = Regexp.last_match.offset(0)
line, col = css_file.find_offset(start_pos)
source_file = Pathname(css_file.path).relative_path_from(Rails.root.join(".."))
missing << "#{source_file}:#{line}:#{col}"
results << "#{source_file}:#{line}:#{col}"
end
end

Expand Down

0 comments on commit 7d467d6

Please sign in to comment.