Skip to content

Commit 1472b4e

Browse files
committed
Merge pull request #1864 from mgreter/bugfix/issue_1812
Improve pseudo selector parsing
2 parents 186710f + 557e47c commit 1472b4e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ namespace Sass {
735735
// remove all block comments (don't skip white-space)
736736
lex< delimited_by< slash_star, star_slash, false > >(false);
737737
// parse functional
738-
if (peek < re_pseudo_selector >())
738+
if (match < re_pseudo_selector >())
739739
{
740740
(*seq) << parse_simple_selector();
741741
}

src/parser.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ namespace Sass {
9696

9797
}
9898

99+
// peek will only skip over space, tabs and line comment
100+
// return the position where the lexer match will occur
101+
template <Prelexer::prelexer mx>
102+
const char* match(const char* start = 0)
103+
{
104+
// match the given prelexer
105+
return mx(position);
106+
}
107+
99108
// peek will only skip over space, tabs and line comment
100109
// return the position where the lexer match will occur
101110
template <Prelexer::prelexer mx>

0 commit comments

Comments
 (0)