lib/nanoc/data_sources/filesystem_unified.rb in nanoc-4.0.0b1 vs lib/nanoc/data_sources/filesystem_unified.rb in nanoc-4.0.0b2
- old
+ new
@@ -85,18 +85,18 @@
end
# Returns the identifier derived from the given filename, first stripping
# the given directory name off the filename.
def identifier_for_filename(filename)
- if config[:identifier_style] == 'full'
- return Nanoc::Identifier.new(filename, style: :full)
+ if config[:identifier_type] == 'full'
+ return Nanoc::Identifier.new(filename)
end
if filename =~ /(^|\/)index(\.[^\/]+)?$/
regex = @config && @config[:allow_periods_in_identifiers] ? /\/?(index)?(\.[^\/\.]+)?$/ : /\/?index(\.[^\/]+)?$/
else
regex = @config && @config[:allow_periods_in_identifiers] ? /\.[^\/\.]+$/ : /\.[^\/]+$/
end
- filename.sub(regex, '').__nanoc_cleaned_identifier
+ Nanoc::Identifier.new(filename.sub(regex, ''), type: :legacy)
end
end
end