rgrove / sanitize

Ruby HTML and CSS sanitizer.
MIT License
2.02k stars 142 forks source link

Fix warning in Ruby 2.7+ #206

Closed mscrivo closed 3 years ago

mscrivo commented 3 years ago

This fixes the following warning when creating your own transformer like so:

class SomeTransformer
  def call(node:, **_)
    {
      node_allowlist: [node],
    }
  end
end
/usr/local/bundle/ruby/2.7.0/gems/sanitize-5.2.1/lib/sanitize.rb:207: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call