add glob support to include,exclude option#743
Conversation
lib/jekyll/site.rb
Outdated
There was a problem hiding this comment.
It's better to use Enumerable#any? here:
exps.any? { |exp| File.fnmatch?(exp, e) }|
@ixti great idea! change code to use any? instead |
lib/jekyll/site.rb
Outdated
There was a problem hiding this comment.
You'll have SyntaxError here. Remove closing bracket: }) -> }
|
sorry,i edit code with iPad. ^_^ |
|
👍 This looks fine to me. I believe it also fulfills @qrush's desire to use globs instead of regexps. |
lib/jekyll/site.rb
Outdated
There was a problem hiding this comment.
I feel like this should be a core extension instead of randomly in Jekyll. Jekyll#glob_include? just feels weirder to me than Array#glob_include? or something.
There was a problem hiding this comment.
I must admin it was my thought as well.
I think it should be Array#glob_include?.
There was a problem hiding this comment.
My choose is Enumerable#glob_include?
|
Please consider making the changes as proposed in the diff. I'd be happy to merge if that change is made. |
|
Thanks for doing that. I am working on figuring out which test is failing, but Cucumber is proving fickle. |
add glob support to include, exclude option
use File.fnmatch to glob match