diff --git a/.rubocop.yml b/.rubocop.yml index cdfb67d2..cfd46810 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -61,8 +61,6 @@ Style/FrozenStringLiteralComment: Enabled: false Style/EvalWithLocation: Enabled: false -Style/Lambda: - Enabled: false Style/ClassVars: Enabled: false Style/GlobalVars: diff --git a/middleman-core/lib/middleman-core/application.rb b/middleman-core/lib/middleman-core/application.rb index be29dc23..0b9a759b 100644 --- a/middleman-core/lib/middleman-core/application.rb +++ b/middleman-core/lib/middleman-core/application.rb @@ -191,7 +191,7 @@ module Middleman ignored end, - layout: ->(file, app) { + layout: lambda { |file, app| file[:relative_path].to_s.start_with?('layout.', app.config[:layouts_dir] + '/') } }, 'Callbacks that can exclude paths from the sitemap'