aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2014-02-24 20:52:26 -0600
committerBrandon Mathis <brandon@imathis.com>2014-02-24 20:52:26 -0600
commit0ead88e6c2f26441e200a1a1132fb1a90225b854 (patch)
treeeb38ac0ae13c58ec2f1a4c9592bbc847aa59110d /plugins
parent132142338346def454c8913c176bf5c0e0be8295 (diff)
downloadmy_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.rb4
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