File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ namespace Sass {
142
142
// ##########################################################################
143
143
bool Extender::checkForUnsatisfiedExtends (Extension& unsatisfied) const
144
144
{
145
+ if (selectors.empty ()) return false ;
145
146
ExtSmplSelSet originals = getSimpleSelectors ();
146
147
for (auto target : extensions) {
147
148
SimpleSelector* key = target.first ;
Original file line number Diff line number Diff line change @@ -2247,15 +2247,17 @@ namespace Sass {
2247
2247
if (lex < kwd_not >()) { media_query->is_negated (true ); lex < css_comments >(false ); }
2248
2248
else if (lex < kwd_only >()) { media_query->is_restricted (true ); lex < css_comments >(false ); }
2249
2249
2250
- if (lex < identifier_schema >()) media_query->media_type (parse_identifier_schema ());
2251
- else if (lex < identifier >()) media_query->media_type (parse_interpolated_chunk (lexed));
2250
+ if (lex < identifier_schema >()) media_query->media_type (parse_identifier_schema ());
2251
+ else if (lex < identifier >()) media_query->media_type (parse_interpolated_chunk (lexed));
2252
2252
else media_query->append (parse_media_expression ());
2253
2253
2254
2254
while (lex_css < kwd_and >()) media_query->append (parse_media_expression ());
2255
2255
if (lex < identifier_schema >()) {
2256
2256
String_Schema* schema = SASS_MEMORY_NEW (String_Schema, pstate);
2257
- schema->append (media_query->media_type ());
2258
- schema->append (SASS_MEMORY_NEW (String_Constant, pstate, " " ));
2257
+ if (media_query->media_type ()) {
2258
+ schema->append (media_query->media_type ());
2259
+ schema->append (SASS_MEMORY_NEW (String_Constant, pstate, " " ));
2260
+ }
2259
2261
schema->append (parse_identifier_schema ());
2260
2262
media_query->media_type (schema);
2261
2263
}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ namespace Sass {
24
24
25
25
size_t L = in.size (), n = 0 ;
26
26
27
+ if (L == 0 ) return {};
27
28
// Exit early if any entry is empty
28
29
for (size_t i = 0 ; i < L; i += 1 ) {
29
30
if (in[i].size () == 0 ) return {};
@@ -80,12 +81,18 @@ namespace Sass {
80
81
81
82
size_t L = in.size ();
82
83
size_t n = in.size () - 1 ;
84
+
85
+ if (L == 0 ) return {};
86
+ // Exit early if any entry is empty
87
+ for (size_t i = 0 ; i < L; i += 1 ) {
88
+ if (in[i].size () == 0 ) return {};
89
+ }
90
+
83
91
size_t * state = new size_t [L];
84
92
std::vector< std::vector<T>> out;
85
93
86
94
// First initialize all states for every permutation group
87
95
for (size_t i = 0 ; i < L; i += 1 ) {
88
- if (in[i].size () == 0 ) return {};
89
96
state[i] = in[i].size () - 1 ;
90
97
}
91
98
@@ -104,10 +111,8 @@ namespace Sass {
104
111
// Current group finished
105
112
if (state[n] == 0 ) {
106
113
// Find position of next decrement
107
- while (n > 0 && state[--n] == 0 )
108
- {
114
+ while (n > 0 && state[--n] == 0 ) {}
109
115
110
- }
111
116
// Check for end condition
112
117
if (state[n] != 0 ) {
113
118
// Decrease next on the left side
You can’t perform that action at this time.
0 commit comments