Handle lexing of input such as just "</".
Previously this would cause the lexer to go in an infinite loop in the "text" state machine. This fixes #37.
This commit is contained in:
1 parent
b06eadc812
commit
ad2e040f05
2 files changed
+20
No files matched your search
@@ -21,5 +21,17 @@ describe Oga::XML::Lexer do
|
||||
example 'lex a > as regular text' do
|
||||
lex('>').should == [[:T_TEXT, '>', 1]]
|
||||
end
|
||||
|
||||
example 'lex </ as regular text' do
|
||||
lex('</').should == [[:T_TEXT, '</', 1]]
|
||||
end
|
||||
|
||||
example 'lex <! as regular text' do
|
||||
lex('<!').should == [[:T_TEXT, '<!', 1]]
|
||||
end
|
||||
|
||||
example 'lex <? as regular text' do
|
||||
lex('<?').should == [[:T_TEXT, '<?', 1]]
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user