Permalink
Browse files

pass filename option to filters

  • Loading branch information...
1 parent df993c0 commit feaa1afb648da97d82c32e052d58d23cf3f5e72d @eldargab eldargab committed Jan 9, 2013
View
@@ -468,7 +468,7 @@ Parser.prototype = {
var str = fs.readFileSync(path, 'utf8');
var ext = extname(path).slice(1);
var filter = filters[ext];
- if (filter) str = filter(str).replace(/\\n/g, '\n');
+ if (filter) str = filter(str, {filename: this.filename}).replace(/\\n/g, '\n');
return new nodes.Literal(str);
}
@@ -0,0 +1,4 @@
+<style type="text/css">body {
+ padding: 10px;
+}
+</style>
@@ -0,0 +1 @@
+include some.styl
@@ -0,0 +1,2 @@
+body
+ padding 10px
View
@@ -0,0 +1 @@
+@import "some-included"

0 comments on commit feaa1af

Please sign in to comment.