Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix match? that were not detected by RuboCop #174

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

tagliala
Copy link
Contributor

Maybe because of some false negatives affecting conditionals

Ref: rubocop/rubocop-performance#152

Why and what is being done.

Pre-Merge Checklist

  • CHANGELOG.md updated with short summary

@grosser
Copy link
Contributor

grosser commented Dec 13, 2024

CI disagrees :)

Maybe because of some false negatives affecting conditionals

Ref: rubocop/rubocop-performance#152
@tagliala tagliala force-pushed the chore/fix-match-missed branch from 59cd4fe to f6addfb Compare December 13, 2024 18:33
@tagliala
Copy link
Contributor Author

Ah, sorry, typo with autocomplete

-tokens
+token

@@ -448,7 +448,7 @@ def parse_block_into_rule_sets!(block, options = {}) # :nodoc:
current_media_query << token << ' '
end
end
elsif in_charset or token =~ /@charset/i
elsif in_charset or /@charset/i.match?(token)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to mention, does not seem that the second condition is covered by tests

@grosser grosser merged commit 54b8ea5 into premailer:master Dec 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants