Use #tr instead of #gsub

This commit is contained in:
Parker Moore
2014-10-22 00:57:25 -07:00
parent b9c4fc93d7
commit 3227c4ecea

View File

@@ -46,7 +46,7 @@ module Jekyll
# Returns the _unsanitizied_ String URL
def generate_url
@placeholders.inject(@template) do |result, token|
result.gsub(/:#{token.first}/, self.class.escape_path(token.last))
result.tr(":#{token.first}", self.class.escape_path(token.last))
end
end