Skip to content

Commit

Permalink
HTML: fix starting tag name parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Sep 30, 2024
1 parent bfd29f3 commit 114f253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html/lex.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (l *Lexer) shiftBogusComment() []byte {

func (l *Lexer) shiftStartTag() (TokenType, []byte) {
for {
if c := l.r.Peek(0); c == ' ' || c == '>' || c == '/' && l.r.Peek(1) == '>' || c == '\t' || c == '\n' || c == '\r' || c == '\f' || c == 0 && l.r.Err() != nil {
if c := l.r.Peek(0); (c < 'a' || 'z' < c) && (c < 'A' || 'Z' < c) && (c < '0' || '9' < c) && c != '-' {
break
}
l.r.Move(1)
Expand Down

0 comments on commit 114f253

Please sign in to comment.