mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
LibWeb: Implement the "after attribute name" tokenizer state
One little step at a time towards parsing the monster blob of HTML we get from twitter.com :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 06:04:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/39b5494aeba
@@ -807,6 +807,31 @@ _StartOfFunction:
|
||||
|
||||
BEGIN_STATE(AfterAttributeName)
|
||||
{
|
||||
ON_WHITESPACE
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ON('/')
|
||||
{
|
||||
SWITCH_TO(SelfClosingStartTag);
|
||||
}
|
||||
ON('=')
|
||||
{
|
||||
SWITCH_TO(BeforeAttributeValue);
|
||||
}
|
||||
ON('>')
|
||||
{
|
||||
SWITCH_TO(Data);
|
||||
}
|
||||
ON_EOF
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
m_current_token.m_tag.attributes.append(HTMLToken::AttributeBuilder());
|
||||
RECONSUME_IN(AttributeName);
|
||||
}
|
||||
}
|
||||
END_STATE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user