vendor/lib/visitor/evaluator.js in stylus-source-0.30.1 vs vendor/lib/visitor/evaluator.js in stylus-source-0.31.0

- old
+ new

@@ -647,17 +647,17 @@ // Enusre string if (!path.string) throw new Error('@import string expected'); var name = path = path.string; // Literal - if (~path.indexOf('.css')) { + if (~path.indexOf('.css') && !~path.indexOf('.css.')) { literal = true; if (!includeCSS) return imported; } // support optional .styl - if (!literal && !~path.indexOf('.styl')) path += '.styl'; + if (!literal && !/\.styl$/i.test(path)) path += '.styl'; // Lookup found = utils.lookup(path, this.paths, this.filename); found = found || utils.lookup(join(name, 'index.styl'), this.paths, this.filename); @@ -1005,9 +1005,10 @@ block = this.stack[i].block; if (block.node) { switch (block.node.nodeName) { case 'group': case 'function': + case 'media': return block; } } } });