lib/i18n/tasks/html_keys.rb in i18n-tasks-0.9.6 vs lib/i18n/tasks/html_keys.rb in i18n-tasks-0.9.7
- old
+ new
@@ -3,11 +3,13 @@
module HtmlKeys
HTML_KEY_PATTERN = /[.\-_]html\z/
MAYBE_PLURAL_HTML_KEY_PATTERN = /[.\-_]html\.[^.]+\z/
def html_key?(full_key, locale)
+ # rubocop:disable Style/DoubleNegation
!!(full_key =~ HTML_KEY_PATTERN ||
full_key =~ MAYBE_PLURAL_HTML_KEY_PATTERN &&
depluralize_key(split_key(full_key, 2)[1], locale) =~ HTML_KEY_PATTERN)
+ # rubocop:enable Style/DoubleNegation
end
end
end