Add specific check for TLD-like strings when replacing inline urls. Fixes #1751
This commit is contained in:
parent
be2788b6ca
commit
a47b2138f8
3 changed files with 11 additions and 1 deletions
|
@ -349,7 +349,7 @@ module Middleman
|
|||
begin
|
||||
uri = ::Addressable::URI.parse(asset_path)
|
||||
|
||||
if uri.relative? && uri.host.nil? && (result = yield asset_path)
|
||||
if uri.relative? && uri.host.nil? && !asset_path.match(/^[^\/].*[a-z]+\.[a-z]+\/.*/) && (result = yield(asset_path))
|
||||
"#{opening_character}#{result}"
|
||||
else
|
||||
match
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue