fix slash handling for paths

This commit is contained in:
maul.esel 2013-10-14 18:43:12 +02:00
parent 8091029329
commit 67a451ea84
1 changed files with 1 additions and 0 deletions

View File

@ -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