From c23b2a4ad3f77222b6bfb219610fca79024ca4e5 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Tue, 14 Jun 2005 10:30:36 +0000 Subject: Updated vendor copy of html-scanner lib, for bug fixes and optimizations git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/action_controller/vendor/html-scanner/html/document.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller/vendor/html-scanner/html/document.rb') diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb index e14d9de166..f8a37e9454 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb @@ -1,7 +1,7 @@ require 'html/tokenizer' require 'html/node' -module HTML#:nodoc: +module HTML #:nodoc: # A top-level HTMl document. You give it a body of text, and it will parse that # text into a tree of nodes. @@ -11,7 +11,7 @@ module HTML#:nodoc: attr_reader :root # Create a new Document from the given text. - def initialize(text) + def initialize(text, strict=false) tokenizer = Tokenizer.new(text) @root = Node.new(nil) node_stack = [ @root ] @@ -28,7 +28,7 @@ module HTML#:nodoc: open_start = 0 if open_start < 0 close_start = node.position - 20 close_start = 0 if close_start < 0 - warn <