From 67a451ea8414761de811aff1eb427f932ae79645 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Mon, 14 Oct 2013 18:43:12 +0200 Subject: [PATCH] fix slash handling for paths --- lib/jekyll/frontmatter_defaults.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/jekyll/frontmatter_defaults.rb b/lib/jekyll/frontmatter_defaults.rb index 0badf3ee..4f98286c 100644 --- a/lib/jekyll/frontmatter_defaults.rb +++ b/lib/jekyll/frontmatter_defaults.rb @@ -55,6 +55,7 @@ module Jekyll def applies_path?(scope, path) return true if scope['path'].empty? + path = path.gsub(/\A\//, '').gsub(/([^\/])\z/, '\1/') # add / remove slashes from path scope_path = Pathname.new(scope['path']) Pathname.new(path).ascend do |path| if path == scope_path