packages/hexo-cli-extras/lib/edit.js
// filter the posts using a subfolder if supplied
filter the posts using a subfolder if supplied
filter the posts using a subfolder if supplied
function filterFolder(posts, folder) {
        var reFolder = new RegExp(folder);
        return posts.filter(function filterPosts(post) {
          return reFolder.test(post.source.substr(0, post.source.lastIndexOf(path.sep)));
        });
      }
function filterFolder ( posts , folder ) { var reFolder = new RegExp ( folder ) ; return posts . filter ( function filterPosts ( post ) { return reFolder . test ( post . source . substr ( 0 , post . source . lastIndexOf ( path . sep ) ) ) ; } ) ; }
filter the posts using a subfolder if supplied
filter the posts using a subfolder if supplied