Fix up inline url confusion
This commit is contained in:
parent
2403fa2d81
commit
b127283040
9 changed files with 73 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue