Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 6706f09

Browse files
committed
Error on map output and interpolation
Fixes #1246
1 parent f2e2499 commit 6706f09

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

eval.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,11 @@ namespace Sass {
890890
} else if (dynamic_cast<Unary_Expression*>(s)) {
891891
Expression* ex = s->perform(this);
892892
return evacuate_quotes(interpolation(ex));
893+
} else if (dynamic_cast<Map*>(s)) {
894+
To_String to_string(&ctx);
895+
string dbg(s->perform(&to_string));
896+
error(dbg + " isn't a valid CSS value.", s->pstate());
897+
return dbg;
893898
} else {
894899
To_String to_string(&ctx);
895900
return evacuate_quotes(s->perform(&to_string));

output.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ namespace Sass {
2323
top_nodes.push_back(imp);
2424
}
2525

26+
void Output::operator()(Map* m)
27+
{
28+
To_String to_string(ctx);
29+
string dbg(m->perform(&to_string));
30+
error(dbg + " isn't a valid CSS value.", m->pstate());
31+
}
32+
2633
OutputBuffer Output::get_buffer(void)
2734
{
2835

output.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace Sass {
3535
public:
3636
OutputBuffer get_buffer(void);
3737

38+
virtual void operator()(Map*);
3839
virtual void operator()(Ruleset*);
3940
// virtual void operator()(Propset*);
4041
virtual void operator()(Supports_Block*);

0 commit comments

Comments
 (0)