From f5a8000baae7eefd09919ee39b73fa0f2120fa73 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 3 Jun 2016 22:10:15 -0700 Subject: [PATCH] Fix regexp literal issues on master. --- lib/jekyll/url.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/url.rb b/lib/jekyll/url.rb index ba1abbd4..440deb18 100644 --- a/lib/jekyll/url.rb +++ b/lib/jekyll/url.rb @@ -72,13 +72,13 @@ module Jekyll # Remove leading "/" to avoid generating urls with `//` result.gsub(%r!/:#{token.first}!, "") else - result.gsub(/:#{token.first}/, self.class.escape_path(token.last)) + result.gsub(%r!:#{token.first}!, self.class.escape_path(token.last)) end end end def generate_url_from_drop(template) - template.gsub(/:([a-z_]+)/) do |match| + template.gsub(%r!:([a-z_]+)!) do |match| replacement = @placeholders.public_send(match.sub(":".freeze, "".freeze)) if replacement.nil? "".freeze