You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varstylus=require('stylus');str=`.foo for p, v in obj {p}: v.bar for p, v in getObj(#aaa) {p}: v`stylus(str).set('filename','nesting.css').define('obj',{display: 'block',color: 'white'},true).define("getObj",function(color){return{display: 'block',color: color}},true).render(function(err,css){if(err)throwerr;console.log(css);},true)
When I pass a JavaScript object variable to define() and want to get a hash object variable, I can do this by setting raw to true, as mentioned in #2780 and #1286. But when I pass a function that returns a JavaScript object to define(), the raw will not work as the former. see utils.js#L304.
Environment information:
stylus version: 0.59.0
nodejs version: 18.5.0
The text was updated successfully, but these errors were encountered:
To reproduce:
Current behavior:
Expected behavior:
When I pass a JavaScript object variable to
define()
and want to get a hash object variable, I can do this by settingraw
totrue
, as mentioned in #2780 and #1286. But when I pass a function that returns a JavaScript object todefine()
, theraw
will not work as the former. see utils.js#L304.Environment information:
stylus
version: 0.59.0nodejs
version: 18.5.0The text was updated successfully, but these errors were encountered: