Skip to content

Commit

Permalink
rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Jul 10, 2023
1 parent 0b70c95 commit 04ba659
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bridgetown-core/lib/bridgetown-core/filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def uri_escape(input)
def obfuscate_link(input, prefix = "mailto")
link = "<a href=\"#{prefix}:#{input}\">#{input}</a>"
script = "<script type=\"text/javascript\">document.currentScript.insertAdjacentHTML('"
script += "beforebegin', '#{rot47(link).gsub(%r!\\!, '\\\\\\')}'.replace(/[!-~]/g," # rubocop:disable Style/StringLiteralsInInterpolation
script += "beforebegin', '#{rot47(link).gsub(%r!\\!, '\\\\\\')}'.replace(/[!-~]/g," # rubocop:disable Style/StringLiteralsInInterpolation, Style/RedundantRegexpArgument
script += "function(c){{var j=c.charCodeAt(0);if((j>=33)&&(j<=126)){"
script += "return String.fromCharCode(33+((j+ 14)%94));}"
script += "else{return String.fromCharCode(j);}}}));</script>"
Expand Down
2 changes: 1 addition & 1 deletion bridgetown-core/lib/bridgetown-core/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def slotted?(name)
view.view_context.resource
end

return unless resource
return false unless resource

name = name.to_s
resource.slots.any? do |slot|
Expand Down

0 comments on commit 04ba659

Please sign in to comment.