Skip to content

Commit

Permalink
<base> is a void element
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Oct 2, 2024
1 parent d538ac0 commit 991cf51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/phlex/html/standard_elements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,6 @@ def b(
) = nil
register_element :b

# Outputs a `<base>` tag.
# See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
def base(
class: nil,
href: nil,
id: nil,
target: nil,
**attributes,
&content
) = nil
register_element :base

# Outputs a `<bdi>` tag.
# See https://developer.mozilla.org/docs/Web/HTML/Element/bdi
def bdi(id: nil, class: nil, **attributes, &content) = nil
Expand Down
11 changes: 11 additions & 0 deletions lib/phlex/html/void_elements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ module Phlex::HTML::VoidElements
**attributes
) = nil

# Outputs a `<base>` tag.
# See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
def base(
class: nil,
href: nil,
id: nil,
target: nil,
**attributes
) = nil
register_element :base

# Outputs a `<br>` tag.
# See https://developer.mozilla.org/docs/Web/HTML/Element/br
__register_void_element__ def br(
Expand Down

0 comments on commit 991cf51

Please sign in to comment.