Changeset 69

Show
Ignore:
Timestamp:
08/10/2006 14:59:08 (2 years ago)
Author:
why
Message:
  • lib/markaby/builder.rb: no longer auto-DOCTYPE and auto-meta on the html tag. use xhtml_transitional instead. ticket #20.
Location:
branches/xhtml-careful
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/xhtml-careful/lib/markaby/builder.rb

    r68 r69  
    247247    # are prepended.  Also assumes <tt>:xmlns => "http://www.w3.org/1999/xhtml", 
    248248    # :lang => "en"</tt>. 
    249     def html(*doctype, &block) 
     249    def xhtml_transitional(*doctype, &block) 
    250250      @builder.instruct! if @output_xml_instruction 
    251251      @builder.declare!(:DOCTYPE, :html, :PUBLIC, *tagset.doctype) 
    252252      tag!(:html, :xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en", &block) 
    253253    end 
    254     alias_method :xhtml_transitional, :html 
    255254 
    256255    # Builds an html tag with XHTML 1.0 Strict doctype instead. 
  • branches/xhtml-careful/test/test_markaby.rb

    r68 r69  
    7878  def test_valid_xhtml 
    7979    # tickets #14 and #21 identified missing attributes, let's test a few. 
    80     assert_equal %{<th colspan="1"></th>}, mab("th(:colspan => 1)") 
     80    assert_equal %{<html><th colspan="1"></th></html>}, mab("html { th(:colspan => 1) }") 
    8181    assert_equal %{<tbody class="okay"></tbody>}, mab("tbody.okay {}") 
    8282