Module: Herb::HTML::Util

Defined in:
lib/herb/html/util.rb

Constant Summary collapse

VOID_ELEMENTS =

TODO: extract to shared utility for all languages in .yml

["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"].freeze

Class Method Summary collapse

Class Method Details

.void_element?(tag_name) ⇒ Boolean

: (String) -> bool

Returns:

  • (Boolean)


11
12
13
# File 'lib/herb/html/util.rb', line 11

def self.void_element?(tag_name)
  VOID_ELEMENTS.include?(tag_name.downcase)
end