Skip to content

Commit

Permalink
Merge pull request #1833 from mgreter/bugfix/media-query-with-comments
Browse files Browse the repository at this point in the history
Improve parsing of media queries with comments
  • Loading branch information
mgreter committed Jan 9, 2016
2 parents 55cbcd0 + 8e0efd9 commit a227315
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,11 +982,9 @@ namespace Sass {
}

// it's not a map so return the lexed value as a list value
if (!peek< exactly<':'> >())
if (!lex_css< exactly<':'> >())
{ return key; }

lex< exactly<':'> >();

Expression* value = parse_space_list();

(*map) << std::make_pair(key, value);
Expand Down Expand Up @@ -1931,10 +1929,10 @@ namespace Sass {
}
feature = parse_expression();
Expression* expression = 0;
if (lex< exactly<':'> >()) {
if (lex_css< exactly<':'> >()) {
expression = parse_list();
}
if (!lex< exactly<')'> >()) {
if (!lex_css< exactly<')'> >()) {
error("unclosed parenthesis in media query expression", pstate);
}
return SASS_MEMORY_NEW(ctx.mem, Media_Query_Expression, feature->pstate(), feature, expression);
Expand Down

0 comments on commit a227315

Please sign in to comment.