Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ module.exports = function(opts) {

// now get the ordered list of filters
var filterlist = match.split('(').slice(0, -1);
var others = match.split(',').slice(1).map(function(item, index){
return item.match(/[\"']([\s\S]*?)[\"']/)[1];
});
filterlist = filterlist.map(function(str) {
return opts.filters[str.trim()];
});
Expand All @@ -165,7 +168,7 @@ module.exports = function(opts) {
var filter = filterlist.reduce(compose);

// and apply the composed function to the stringified content
return filter(String(includeContent));
return filter.apply(this, [String(includeContent)].concat(others));
}
};

Expand Down