#276 ✓wontfix
Ara Vartanian

BaseParser and terminal self-closing tags

Reported by Ara Vartanian | September 28th, 2008 @ 06:20 AM

The Hobo BaseParser doesn't seem to provide end_element events for terminal self-closing tags.

content = '<tag/>'

parser = Hobo::Dryml::Parser::BaseParser.new(content)

while parser.has_next?
  event = parser.pull
  puts event.inspect
end

outputs:

[:start_element, "tag", {}, "<tag/>", false]

By contrast:

content = '<tag/><tag/>'

parser = Hobo::Dryml::Parser::BaseParser.new(content)

while parser.has_next?
  event = parser.pull
  puts event.inspect
end

outputs:

[:start_element, "tag", {}, "<tag/>", false]
[:end_element, "tag", false]
[:start_element, "tag", {}, "<tag/>", false]

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Tags

Pages