mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00: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:
parent
1b0c39ca60
commit
39b5494aeb
Notes:
sideshowbarker
2024-07-19 06:04:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/39b5494aeba
1 changed files with 25 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue