mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Resync with html-scanner (fix parser bug)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -19,7 +19,7 @@ module HTML #:nodoc:
|
||||
node = Node.parse(node_stack.last, tokenizer.line, tokenizer.position, token)
|
||||
|
||||
node_stack.last.children << node unless node.tag? && node.closing == :close
|
||||
if node.tag? && !node.childless?
|
||||
if node.tag?
|
||||
if node_stack.length > 1 && node.closing == :close
|
||||
if node_stack.last.name == node.name
|
||||
node_stack.pop
|
||||
@@ -38,7 +38,7 @@ ignoring attempt to close #{node_stack.last.name} with #{node.name}
|
||||
EOF
|
||||
strict ? raise(msg) : warn(msg)
|
||||
end
|
||||
elsif node.closing != :close
|
||||
elsif !node.childless? && node.closing != :close
|
||||
node_stack.push node
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user