0
0
Fork 0

Autofix Rubocop Style/RedundantBegin (#23703)

This commit is contained in:
Nick Schonning 2023-02-18 17:09:40 -05:00 committed by GitHub
parent 167709f6b0
commit 2177daeae9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 458 additions and 695 deletions

View file

@ -41,13 +41,11 @@ class Sanitize
current_node = env[:node]
scheme = begin
if current_node['href'] =~ Sanitize::REGEX_PROTOCOL
Regexp.last_match(1).downcase
else
:relative
end
end
scheme = if current_node['href'] =~ Sanitize::REGEX_PROTOCOL
Regexp.last_match(1).downcase
else
:relative
end
current_node.replace(Nokogiri::XML::Text.new(current_node.text, current_node.document)) unless LINK_PROTOCOLS.include?(scheme)
end