diff options
author | Jamis Buck <jamis@37signals.com> | 2005-07-04 15:05:40 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-07-04 15:05:40 +0000 |
commit | 930f33657c7264578bea198f65222471b8ab2d2e (patch) | |
tree | 311ab54876c82b6bcb826fe5202459d451d6bfd8 /actionpack/lib/action_controller/vendor | |
parent | 117ee110d7cbe199f94d2422eb20c0066eb41a10 (diff) | |
download | rails-930f33657c7264578bea198f65222471b8ab2d2e.tar.gz rails-930f33657c7264578bea198f65222471b8ab2d2e.tar.bz2 rails-930f33657c7264578bea198f65222471b8ab2d2e.zip |
Updated html-scanner so that assert_tag(:tag => "p", :content => "foo") behaves as expected
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/vendor')
-rw-r--r-- | actionpack/lib/action_controller/vendor/html-scanner/html/node.rb | 6 | ||||
-rw-r--r-- | actionpack/lib/action_controller/vendor/html-scanner/html/version.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb index 8d1c711226..6d045b0367 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb @@ -379,9 +379,9 @@ module HTML #:nodoc: # :child => /hello world/ } def match(conditions) conditions = validate_conditions(conditions) - - # only Text nodes have content - return false if conditions[:content] + + # check content of child nodes + return false unless children.find { |child| child.match(conditions[:content]) } if conditions[:content] # test the name return false unless match_condition(@name, conditions[:tag]) if conditions[:tag] diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb index 0b4d184a8b..99a8d5766c 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb @@ -3,7 +3,7 @@ module HTML #:nodoc: MAJOR = 0 MINOR = 5 - TINY = 1 + TINY = 2 STRING = [ MAJOR, MINOR, TINY ].join(".") |