Skip to content

Commit

Permalink
vaev-markup: clear tag name builder when leaving raw text state for h…
Browse files Browse the repository at this point in the history
…tml parser
  • Loading branch information
pauloamed committed Jan 8, 2025
1 parent 4329fa1 commit fb90302
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/web/vaev-markup/html.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ void HtmlLexer::consume(Rune rune, bool isEof) {
// then switch to the data state and emit the current tag token.
// Otherwise, treat it as per the "anything else" entry below.
else if (rune == '>' and _isAppropriateEndTagToken()) {
_builder.clear();
_switchTo(State::DATA);
_emit();
}
Expand Down Expand Up @@ -1715,6 +1716,7 @@ void HtmlLexer::consume(Rune rune, bool isEof) {
// data state. Emit the current tag token.
if (rune == '>') {
_ensure().selfClosing = true;
_builder.clear();
_switchTo(State::DATA);
_emit();
}
Expand Down

0 comments on commit fb90302

Please sign in to comment.