Minor relative_assets cleanup

This commit is contained in:
Thomas Reynolds 2012-04-26 15:59:28 -07:00
parent 8bf0124241
commit 4a49388d64

View file

@ -1,5 +1,6 @@
# Extension namespace
module Middleman::Extensions
module Middleman
module Extensions
# Relative Assets extension
module RelativeAssets
@ -40,10 +41,11 @@ module Middleman::Extensions
path
else
path = File.join(prefix, path) if prefix.length > 0
request_path = @request_path.dup
request_path << index_file if path.match(%r{/$})
request_path.gsub!(%r{^/}, '')
parts = request_path.split('/')
parts = request_path.gsub(%r{^/}, '').split('/')
if parts.length > 1
arry = []
@ -57,7 +59,5 @@ module Middleman::Extensions
end
end
end
# Register extension
# register :relative_assets, RelativeAssets
end
end