Changeset 94

Show
Ignore:
Timestamp:
12/05/2006 16:05:11 (2 years ago)
Author:
tec
Message:
  • lib/markaby/tags.rb: remove NO_PROXY; hr and br can have class/id attributes
  • lib/markaby/builder.rb: ditto
  • test/test_markaby.rb: be assertive
Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/markaby/builder.rb

    r91 r94  
    185185        raise InvalidXhtmlError, "the `\#{sym}' element is self-closing, please remove the block" 
    186186      end 
    187       if args.empty? and block.nil? and not NO_PROXY.include?(sym) 
     187      if args.empty? and block.nil? 
    188188        return CssProxy.new do |args, block| 
    189189          if @tagset.forms.include?(sym) and args.last.respond_to?(:to_hash) and args.last[:id] 
  • trunk/lib/markaby/tags.rb

    r80 r94  
    33  FORM_TAGS = [ :form, :input, :select, :textarea ] 
    44  SELF_CLOSING_TAGS = [ :base, :meta, :link, :hr, :br, :param, :img, :area, :input, :col ] 
    5   NO_PROXY = [ :hr, :br ] 
    65 
    76  # Common sets of attributes. 
  • trunk/test/test_markaby.rb

    r87 r94  
    3737    assert_equal %{<div class="one two"></div>}, mab { div.one.two '' } 
    3838    assert_equal %{<div id="three"></div>}, mab { div.three! '' } 
     39    assert_equal %{<hr class="hidden"/>}, mab { hr.hidden } 
    3940  end 
    4041