diff options
author | Brandon Mathis <brandon@imathis.com> | 2014-02-24 20:52:26 -0600 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2014-02-24 20:52:26 -0600 |
commit | 0ead88e6c2f26441e200a1a1132fb1a90225b854 (patch) | |
tree | eb38ac0ae13c58ec2f1a4c9592bbc847aa59110d /plugins | |
parent | 132142338346def454c8913c176bf5c0e0be8295 (diff) | |
download | my_new_personal_website-0ead88e6c2f26441e200a1a1132fb1a90225b854.tar.xz my_new_personal_website-0ead88e6c2f26441e200a1a1132fb1a90225b854.zip |
Fixed the expand_url filter. Finally.
Thanks @larryprice
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/octopress_filters.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 40d6a975..a2ed71f8 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -78,8 +78,8 @@ module OctopressLiquidFilters # Replaces relative urls with full urls def expand_urls(input, url='') url ||= '/' - input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\/\"'>]*)(["|']{1})/ do - $1 + $3 + $4 + input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\/>]{1}[^\"'>]*)/ do + $1+url+$3 end end |