Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 952868e

Browse files
author
Aaron Leung
committed
Fixing a bug when parsing binomial arguments to the :nth-* pseudo-selectors.
1 parent a0e50db commit 952868e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

document_parser.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,10 @@ namespace Sass {
454454
pseudo << context.new_Node(Node::value, path, line, lexed);
455455
}
456456
else if (peek< binomial >(position)) {
457-
lex< coefficient >();
458-
pseudo << context.new_Node(Node::value, path, line, lexed);
457+
if (peek< coefficient >()) {
458+
lex< coefficient >();
459+
pseudo << context.new_Node(Node::value, path, line, lexed);
460+
}
459461
lex< exactly<'n'> >();
460462
pseudo << context.new_Node(Node::value, path, line, lexed);
461463
lex< sign >();

0 commit comments

Comments
 (0)