1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

LibWeb: Dont consider '-n-' a dashndashdigit-ident token

This commit is contained in:
stelar7 2022-05-08 00:25:31 +02:00 committed by Linus Groh
parent 2b3c07f4ad
commit 469380d6bc

View file

@ -5249,6 +5249,8 @@ Optional<Selector::SimpleSelector::ANPlusBPattern> Parser::parse_a_n_plus_b_patt
auto ident = value.token().ident();
if (!ident.starts_with("-n-"sv, CaseSensitivity::CaseInsensitive))
return false;
if (ident.length() == 3)
return false;
for (size_t i = 3; i < ident.length(); ++i) {
if (!is_ascii_digit(ident[i]))
return false;