Skip to content

Commit

Permalink
refactor: simplify #139 file filter
Browse files Browse the repository at this point in the history
  • Loading branch information
David Longworth committed Apr 3, 2017
1 parent 3fe446d commit 8e9f6f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dadi/lib/providers/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ MarkdownProvider.prototype.load = function (requestUrl, done) {
if (err) return done(err)

// Filter out only files with the correct extension
const extFilter = new RegExp('.' + this.extension + '$', 'i')
filepaths = filepaths.filter(i => extFilter.test(i))
filepaths = filepaths.filter(i => !/.[this.extension]$/i.test(i))

// Process each file
async.map(filepaths, this.readFileAsync, (err, readResults) => {
Expand Down

0 comments on commit 8e9f6f7

Please sign in to comment.