class Markaby::HTML5
Constants
- AttrsHTML5
Public Class Methods
Source
# File lib/markaby/html5.rb, line 17 def can_handle? tag_name custom_element? tag_name end
Source
# File lib/markaby/html5.rb, line 13 def custom_element? tag_name tag_name.to_s.include? "_" end
Source
# File lib/markaby/html5.rb, line 29 def custom_element_tag_for tag_name tag_name.to_s.tr("_", "-").to_sym end
Source
# File lib/markaby/html5.rb, line 5 def default_options super.merge({ output_xml_instruction: false, output_meta_tag: "html5", root_attributes: {} }) end
Calls superclass method
Source
# File lib/markaby/html5.rb, line 21 def handle_tag tag_name, builder, *args, &block builder.tag! tag_name, *args, &block end
Source
# File lib/markaby/html5.rb, line 25 def validate_and_transform_tag_name! tag_name custom_element?(tag_name) ? custom_element_tag_for(tag_name) : super end
Calls superclass method
Source
# File lib/markaby/html5.rb, line 33 def validate_attribute! tag_name, attribute_name custom_element?(tag_name) || super end
Calls superclass method