Changeset 69
- Timestamp:
- 08/10/2006 14:59:08 (2 years ago)
- Location:
- branches/xhtml-careful
- Files:
-
- 2 modified
-
lib/markaby/builder.rb (modified) (1 diff)
-
test/test_markaby.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/xhtml-careful/lib/markaby/builder.rb
r68 r69 247 247 # are prepended. Also assumes <tt>:xmlns => "http://www.w3.org/1999/xhtml", 248 248 # :lang => "en"</tt>. 249 def html(*doctype, &block)249 def xhtml_transitional(*doctype, &block) 250 250 @builder.instruct! if @output_xml_instruction 251 251 @builder.declare!(:DOCTYPE, :html, :PUBLIC, *tagset.doctype) 252 252 tag!(:html, :xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en", &block) 253 253 end 254 alias_method :xhtml_transitional, :html255 254 256 255 # Builds an html tag with XHTML 1.0 Strict doctype instead. -
branches/xhtml-careful/test/test_markaby.rb
r68 r69 78 78 def test_valid_xhtml 79 79 # 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) }") 81 81 assert_equal %{<tbody class="okay"></tbody>}, mab("tbody.okay {}") 82 82