HTML closing specs for the <li> element

This commit is contained in:
Yorick Peterse 2015-05-18 21:49:36 +02:00
parent efeb38699a
commit 1ba801370f
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
require 'spec_helper'
describe Oga::XML::Lexer do
describe 'using HTML <li> elements' do
it 'lexes two unclosed <li> elements following each other as separate elements' do
lex_html('<li>foo<li>bar').should == [
[:T_ELEM_NAME, 'li', 1],
[:T_TEXT, 'foo', 1],
[:T_ELEM_END, nil, 1],
[:T_ELEM_NAME, 'li', 1],
[:T_TEXT, 'bar', 1],
[:T_ELEM_END, nil, 1]
]
end
end
end