mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-14 23:22:52 +00:00
LibWeb: Don't emit current token on EOF in HTML Tokenizer
Emitting tokens on EOF caused an infinite loop, freezing the app, which could be a bit annoying when writing an HTML comment at the end of the file in Text Editor. :^)
This commit is contained in:
parent
fb5e2670d6
commit
c157c2148f
Notes:
sideshowbarker
2024-07-17 18:52:40 +09:00
Author: https://github.com/krkk
Commit: c157c2148f
Pull-request: https://github.com/SerenityOS/serenity/pull/12505
Reviewed-by: https://github.com/linusg ✅
1 changed files with 0 additions and 5 deletions
|
@ -1356,7 +1356,6 @@ _StartOfFunction:
|
|||
ON_EOF
|
||||
{
|
||||
log_parse_error();
|
||||
EMIT_CURRENT_TOKEN;
|
||||
EMIT_EOF;
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
|
@ -1388,7 +1387,6 @@ _StartOfFunction:
|
|||
{
|
||||
log_parse_error();
|
||||
m_current_token.set_comment(consume_current_builder());
|
||||
EMIT_CURRENT_TOKEN;
|
||||
EMIT_EOF;
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
|
@ -1419,7 +1417,6 @@ _StartOfFunction:
|
|||
{
|
||||
log_parse_error();
|
||||
m_current_token.set_comment(consume_current_builder());
|
||||
EMIT_CURRENT_TOKEN;
|
||||
EMIT_EOF;
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
|
@ -1447,7 +1444,6 @@ _StartOfFunction:
|
|||
{
|
||||
log_parse_error();
|
||||
m_current_token.set_comment(consume_current_builder());
|
||||
EMIT_CURRENT_TOKEN;
|
||||
EMIT_EOF;
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
|
@ -1468,7 +1464,6 @@ _StartOfFunction:
|
|||
{
|
||||
log_parse_error();
|
||||
m_current_token.set_comment(consume_current_builder());
|
||||
EMIT_CURRENT_TOKEN;
|
||||
EMIT_EOF;
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue