Skip to content

Commit

Permalink
start_with method not starts_with
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias committed Oct 29, 2024
1 parent a91bdfb commit 71da686
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/primer/classify/utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def find_selector(selector)

def infer_selector_key(selector)
REPLACEMENT_KEYS.each do |k, v|
return v.to_sym if selector.starts_with?(k)
return v.to_sym if selector.start_with?(k)
end
selector.split("-").first.to_sym
end
Expand Down
2 changes: 1 addition & 1 deletion test/lib/css_coverage_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setup
# Cleanup the data to make sure it's only one selector per item
@css_data = @css_data
.flat_map { |c| c.gsub(/(\w)\./, '\1 .').split(/[\s:\[+>]+/) }
.select { |c| c.starts_with?(".") }
.select { |c| c.start_with?(".") }
.uniq
end

Expand Down

0 comments on commit 71da686

Please sign in to comment.