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:
Yorick Peterse committed 2014-09-15 17:20:06 +02:00
1 parent b06eadc812
commit ad2e040f05
2 files changed
+20

No files matched your search

+8
View File
@@ -292,6 +292,14 @@
allowed_text = any* -- terminate_text;
text := |*
# Input such as just "</" or "<?". This rule takes precedence over the
# rules below, but only if those don't match.
terminate_text => {
callback("on_text", data, encoding, ts, te);
fnext main;
};
# Text followed by a special tag, such as "foo<!--"
allowed_text @{ mark = p; } terminate_text => {
callback("on_text", data, encoding, ts, mark);