Skip to content

Commit 4c34d16

Browse files
committed
Remove obsolete in_selector flag
1 parent 205dc65 commit 4c34d16

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

src/eval.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,10 +1534,8 @@ namespace Sass {
15341534
{
15351535
LOCAL_FLAG(is_in_selector_schema, true);
15361536
// the parser will look for a brace to end the selector
1537-
ctx.c_options.in_selector = true; // do not compress colors
15381537
Expression_Obj sel = s->contents()->perform(this);
15391538
std::string result_str(sel->to_string(ctx.c_options));
1540-
ctx.c_options.in_selector = false; // flag temporary only
15411539
result_str = unquote(Util::rtrim(result_str));
15421540
char* temp_cstr = sass_copy_c_string(result_str.c_str());
15431541
ctx.strings.push_back(temp_cstr); // attach to context

src/inspect.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ namespace Sass {
4242
void Inspect::operator()(Ruleset_Ptr ruleset)
4343
{
4444
if (ruleset->selector()) {
45-
opt.in_selector = true;
4645
ruleset->selector()->perform(this);
47-
opt.in_selector = false;
4846
}
4947
if (ruleset->block()) {
5048
ruleset->block()->perform(this);
@@ -623,11 +621,6 @@ namespace Sass {
623621
// maybe an unknown token
624622
std::string name = c->disp();
625623

626-
if (opt.in_selector && name != "") {
627-
append_token(name, c);
628-
return;
629-
}
630-
631624
// resolved color
632625
std::string res_name = name;
633626

@@ -915,9 +908,7 @@ namespace Sass {
915908

916909
void Inspect::operator()(Selector_Schema_Ptr s)
917910
{
918-
opt.in_selector = true;
919911
s->contents()->perform(this);
920-
opt.in_selector = false;
921912
}
922913

923914
void Inspect::operator()(Parent_Selector_Ptr p)

src/sass.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,10 @@ struct Sass_Inspect_Options {
9696
// Precision for fractional numbers
9797
int precision;
9898

99-
// Do not compress colors in selectors
100-
bool in_selector;
101-
10299
// initialization list (constructor with defaults)
103100
Sass_Inspect_Options(Sass_Output_Style style = Sass::NESTED,
104-
int precision = 5, bool in_selector = false)
105-
: output_style(style), precision(precision), in_selector(in_selector)
101+
int precision = 5)
102+
: output_style(style), precision(precision)
106103
{ }
107104

108105
};

0 commit comments

Comments
 (0)