Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if scope applies to type before given path #7263

Merged
merged 1 commit into from Sep 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/jekyll/frontmatter_defaults.rb
Expand Up @@ -93,9 +93,9 @@ def all(path, type)
# path - the path to check for
# type - the type (:post, :page or :draft) to check for
#
# Returns true if the scope applies to the given path and type
# Returns true if the scope applies to the given type and path
def applies?(scope, path, type)
applies_path?(scope, path) && applies_type?(scope, type)
applies_type?(scope, type) && applies_path?(scope, path)
end

# rubocop:disable Metrics/AbcSize
Expand Down