Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Pass self instance of FileProcessor as second argument to filterIn and filterOut functions #551

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions lib/fileprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ FileProcessor.prototype.replaceWithRevved = function replaceWithRevved(lines, as
self.log(rxl[1]);
content = content.replace(rxl[0], function (match, src) {
// Consider reference from site root
var srcFile = filterIn(src);
var srcFile = filterIn(src, self);

debug('Let\'s replace ' + src);

Expand All @@ -210,7 +210,7 @@ FileProcessor.prototype.replaceWithRevved = function replaceWithRevved(lines, as
return match;
}

var res = match.replace(src, filterOut(file));
var res = match.replace(src, filterOut(file, self));
if (srcFile !== file) {
self.log(chalk.cyan(src) + ' changed to ' + chalk.cyan(file));
}
Expand Down