Skip to content

Commit 77962e1

Browse files
committed
Merge pull request #1427 from xzyfer/fix/1422
Correctly handle comments on property declarations
2 parents d8b8902 + 93b7fe0 commit 77962e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ namespace Sass {
987987
if (lex< sequence< optional< exactly<'*'> >, identifier_schema > >()) {
988988
prop = parse_identifier_schema();
989989
}
990-
else if (lex< sequence< optional< exactly<'*'> >, identifier > >()) {
990+
else if (lex< sequence< optional< exactly<'*'> >, identifier, zero_plus< block_comment > > >()) {
991991
prop = new (ctx.mem) String_Constant(pstate, lexed);
992992
prop->is_delayed(true);
993993
}
@@ -997,6 +997,7 @@ namespace Sass {
997997
bool is_indented = true;
998998
const string property(lexed);
999999
if (!lex_css< one_plus< exactly<':'> > >()) error("property \"" + property + "\" must be followed by a ':'", pstate);
1000+
lex < optional_css_comments >();
10001001
if (peek_css< exactly<';'> >()) error("style declaration must contain a value", pstate);
10011002
if (peek_css< exactly<'{'> >()) is_indented = false; // don't indent if value is empty
10021003
if (peek_css< static_value >()) {

src/prelexer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ namespace Sass {
3333
const char* block_comment(const char* src)
3434
{
3535
return sequence<
36-
zero_plus < space >,
3736
delimited_by<
3837
slash_star,
3938
star_slash,

0 commit comments

Comments
 (0)