From f0d71ab3e077ca6c138d2456ffabfd4c61ffba44 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Mon, 5 Dec 2016 21:45:21 +1100 Subject: [PATCH] Don't error when an @import is terminated by the end of the block Semicolons are optional for the final declaration of a block. In this case the `}` acts as the declaration's terminator. This was not being handling correctly with `@import`s because they can be followed by a media query. Fixes #2233 Spec sass/sass-spec#982 --- src/parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.cpp b/src/parser.cpp index 78dc7fa216..079dc56a7c 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -345,7 +345,7 @@ namespace Sass { first = false; } while (lex_css< exactly<','> >()); - if (!peek_css,end_of_file>>()) { + if (!peek_css< alternatives< exactly<';'>, exactly<'}'>, end_of_file > >()) { List* media_queries = parse_media_queries(); imp->media_queries(media_queries); }