diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-08-16 00:41:57 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-08-16 00:43:07 -0400 |
commit | a5f87149fec051cbc395bc645de71469361f8c78 (patch) | |
tree | 1f34578d66b50ddea8ee08f10fa331ab995eae6d /plugins | |
parent | 33112a65a8f3bc18843593386beaa3aaa3695f92 (diff) | |
download | my_new_personal_website-a5f87149fec051cbc395bc645de71469361f8c78.tar.xz my_new_personal_website-a5f87149fec051cbc395bc645de71469361f8c78.zip |
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
Diffstat (limited to '')
-rw-r--r-- | plugins/octopress_filters.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |