liberal XMTHML parser
# File lib/feed_tools/vendor/html5/lib/html5/liberalxmlparser.rb, line 77 def normalize_token(token) super(token) # ensure that non-void XHTML elements have content so that separate # open and close tags are emitted if token[:type] == :EndTag if VOID_ELEMENTS.include? token[:name] if @tree.open_elements[-1].name != token["name"] token[:type] = :EmptyTag token["data"] ||= {} end else if token[:name] == @tree.open_elements[-1].name and not @tree.open_elements[-1].hasContent @tree.insertText('') unless @tree.open_elements.any? {|e| e.attributes.keys.include? 'xmlns' and e.attributes['xmlns'] != 'http://www.w3.org/1999/xhtml' } end end end return token end
Generated with the Darkfish Rdoc Generator 2.