From a5f87149fec051cbc395bc645de71469361f8c78 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 16 Aug 2011 00:41:57 -0400 Subject: 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 --- plugins/octopress_filters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 67118b53..9c94f0e2 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -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 -- cgit v1.2.1