lib/maruku/output/to_html.rb
# Pretty much the same as the HTMLElement constructor except it
# copies standard attributes out of the Maruku Element's attributes hash.
Pretty much the same as the HTMLElement constructor except it
copies standard attributes out of the Maruku Element's attributes hash.
Pretty much the same as the HTMLElement constructor except it copies standard attributes out of the Maruku Element ' s attributes hash .
def html_element(name, content="", attributes={})
    attributes = content if attributes.empty? && content.is_a?(Hash)
    Array(HTML4Attributes[name]).each do |att|
      if v = @attributes[att]
        attributes[att.to_s] = MaRuKu::Out::HTML.escapeHTML(v.to_s)
      end
    end
    content = yield if block_given?
    HTMLElement.new(name, attributes, content)
  end
def html_element ( name , content = "" , attributes = { } ) attributes = content if attributes . empty? && content . is_a? ( Hash ) Array ( HTML4Attributes [ name ] ) . each do | att | if v = @attributes [ att ] attributes [ att . to_s ] = MaRuKu :: Out :: HTML . escapeHTML ( v . to_s ) end end content = yield if block_given? HTMLElement . new ( name , attributes , content ) end
Pretty much the same as the HTMLElement constructor except it
copies standard attributes out of the Maruku Element's attributes hash.
Pretty much the same as the HTMLElement constructor except it copies standard attributes out of the Maruku Element ' s attributes hash .
name
<not_specific>
content
<not_specific>
attributes
<not_specific>