lib/nanoc/base/compilation/rules_collection.rb in nanoc-4.0.0a1 vs lib/nanoc/base/compilation/rules_collection.rb in nanoc-4.0.0a2
- old
+ new
@@ -151,11 +151,11 @@
# @param [Nanoc::Int::Layout] layout The layout for which to fetch the filter.
#
# @return [Array, nil] A tuple containing the filter name and the filter
# arguments for the given layout.
def filter_for_layout(layout)
- @layout_filter_mapping.each_pair do |layout_identifier, filter_name_and_args|
- return filter_name_and_args if layout.identifier =~ layout_identifier
+ @layout_filter_mapping.each_pair do |pattern, filter_name_and_args|
+ return filter_name_and_args if pattern.match?(layout.identifier)
end
nil
end
# Returns the Nanoc::Int::CompilerDSL that should be used for this site.