Skip to content

Commit

Permalink
Remove element deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Apr 6, 2024
1 parent dc6f375 commit a184218
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/phlex/elements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,11 @@ def #{method_name}(**attributes, &block)
end

# @api private
def register_void_element(method_name, tag: method_name.name.tr("_", "-"), deprecated: false)
if deprecated
deprecation = <<~RUBY
Kernel.warn "#{deprecated}"
RUBY
else
deprecation = ""
end

def register_void_element(method_name, tag: method_name.name.tr("_", "-"))
class_eval(<<-RUBY, __FILE__, __LINE__ + 1)
# frozen_string_literal: true
def #{method_name}(**attributes)
#{deprecation}
context = @_context
buffer = context.buffer
fragment = context.fragments
Expand Down

0 comments on commit a184218

Please sign in to comment.