Changeset 112
- Timestamp:
- 02/18/2007 02:23:49 (22 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 modified
-
CHANGELOG (modified) (1 diff)
-
lib/hpricot/elements.rb (modified) (1 diff)
-
lib/hpricot/traverse.rb (modified) (1 diff)
-
test/test_alter.rb (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r107 r112 1 1 = 0.5 2 === 31rd January, 200 62 === 31rd January, 2007 3 3 4 4 * support for a[text()="Click Me!"] and h3[text()*="space"] and the like. -
trunk/lib/hpricot/elements.rb
r106 r112 119 119 # 120 120 # doc = Hpricot("<p> We have <i>so much</i> to say.</p>") 121 # doc.search("i").empty 121 # doc.search("i").empty! 122 122 # doc.to_html 123 123 # => "<p> We have <i></i> to say.</p>" 124 124 # 125 def empty 125 def empty! 126 126 each { |x| x.inner_html = nil } 127 127 end -
trunk/lib/hpricot/traverse.rb
r99 r112 80 80 # Adds elements immediately before this element, contained in the +html+ string. 81 81 def before(html) 82 parent.insert_ after(Hpricot.make(html), self)82 parent.insert_before(Hpricot.make(html), self) 83 83 end 84 84
