Fix up inline url confusion

This commit is contained in:
Thomas Reynolds 2015-04-26 13:01:19 -07:00
parent 2403fa2d81
commit b127283040
9 changed files with 73 additions and 32 deletions

View file

@ -356,15 +356,10 @@ module Middleman
opening_character = $1
asset_path = $2
begin
uri = ::Addressable::URI.parse(asset_path)
if uri.relative? && result = yield(asset_path)
"#{opening_character}#{result}"
else
match
end
rescue
uri = ::Addressable::URI.parse(asset_path)
if uri.relative? && result = yield(asset_path)
"#{opening_character}#{result}"
else
match
end
end