accessing the interpolated @debug and @warn messages from SassEngine#to_tree

5 views
Skip to first unread message

Timothy Sabat

unread,
Feb 2, 2016, 2:17:40 PM2/2/16
to Sass
Hello All,

We use SASS and SCSS at CodePen and I'm trying to make it super-fancy by responding with @warn and @debug directives in a formatted array.  We don't want to parse STDOUT, so I'm trying to capture the results of Debug and Warn nodes via the Sass::Engine#to_tree, method.

Buuuut, we're running into trouble.  I'm sure it is just that I've not read the lib for long enough, but some jumpstarting would help.

Here's a minimum test-case:


Basically, I can get at the nodes I want, but I can't make them interpolate.  For example, the DebugNode filled with

"Invalid color name: #{$color}, returning white instead.";

does not interpolate on `expr.to_sass`, here.

So, the question remains.  How can I get interpolated debug nodes?

Thanks in advance.

Tim
Reply all
Reply to author
Forward
0 new messages