EntryFilter#special? should also check the base name of the entry

This commit is contained in:
Parker Moore
2014-04-06 12:58:56 -04:00
parent f0e68d7d86
commit 323ea0ef73

View File

@@ -1,5 +1,7 @@
module Jekyll
class EntryFilter
SPECIAL_LEADING_CHARACTERS = ['.', '_', '#'].freeze
attr_reader :site
def initialize(site, base_directory = nil)
@@ -35,7 +37,8 @@ module Jekyll
end
def special?(entry)
['.', '_', '#'].include?(entry[0..0])
SPECIAL_LEADING_CHARACTERS.include?(entry[0..0]) ||
SPECIAL_LEADING_CHARACTERS.include?(File.basename(entry)[0..0])
end
def backup?(entry)