Skip to content

Commit 81f701a

Browse files
committed
Fix regression with declarations without terminating semicolons
This PR fixes a regression with interpolated lists being turned into strings if the terminating semicolon on was missing. Fixes #1610 Specs sass/sass-spec#548
1 parent c8dc995 commit 81f701a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/parser.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ namespace Sass {
23312331
// match in one big "regex"
23322332
if (const char* q =
23332333
peek <
2334-
one_plus <
2334+
non_greedy <
23352335
alternatives <
23362336
// consume whitespace
23372337
block_comment, spaces,
@@ -2344,10 +2344,19 @@ namespace Sass {
23442344
parenthese_scope,
23452345
interpolant
23462346
>
2347+
>,
2348+
sequence <
2349+
optional_spaces,
2350+
alternatives <
2351+
exactly<'{'>,
2352+
exactly<'}'>,
2353+
exactly<';'>
2354+
>
23472355
>
23482356
>
23492357
>(p)
23502358
) {
2359+
if (p == q) return rv;
23512360
while (p < q) {
23522361
// did we have interpolations?
23532362
if (*p == '#' && *(p+1) == '{') {

0 commit comments

Comments
 (0)