expand_urls now correctly matches urls pointing to the root directory, allowing / to be replaced with /subdir/ if site is configured with a different root directory
This commit is contained in:
parent
33112a65a8
commit
a5f87149fe
@ -58,7 +58,7 @@ module OctopressFilters
|
||||
# Replaces relative urls with full urls
|
||||
def expand_urls(input, url='')
|
||||
url ||= '/'
|
||||
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]+)/ do
|
||||
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do
|
||||
$1+url+$3
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user