From bb249feb8d80d9cb73637d871e68c1e07bdd5fdc Mon Sep 17 00:00:00 2001 From: Brandon Zylstra Date: Tue, 30 Jan 2024 18:33:17 -0500 Subject: [PATCH] Simplify calls to `register_element` (#639) This removes redundancy in calling `register_element`, since the `tag:` parameter is _almost always_ unnecessary, as it can be computed based on the `method_name`. I'm sorry that I haven't fully tested this change because I wasn't able to get the green dots tests working... filing a bug for that shortly... --- lib/phlex/html/standard_elements.rb | 202 ++++++++++++++-------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/lib/phlex/html/standard_elements.rb b/lib/phlex/html/standard_elements.rb index 9a0cfe9a..9f2adc22 100644 --- a/lib/phlex/html/standard_elements.rb +++ b/lib/phlex/html/standard_elements.rb @@ -16,623 +16,623 @@ module Phlex::HTML::StandardElements # @return [nil] # @yieldparam component [self] # @see https://developer.mozilla.org/docs/Web/HTML/Element/abbr - register_element :abbr, tag: "abbr" + register_element :abbr # @!method address(**attributes, &content) # Outputs an `
` tag. # @return [nil] # @yieldparam component [self] # @see https://developer.mozilla.org/docs/Web/HTML/Element/address - register_element :address, tag: "address" + register_element :address # @!method article(**attributes, &content) # Outputs an `
` tag. # @return [nil] # @yieldparam component [self] # @see https://developer.mozilla.org/docs/Web/HTML/Element/article - register_element :article, tag: "article" + register_element :article # @!method aside(**attributes, &content) # Outputs an `