Use #tr instead of #gsub
This commit is contained in:
parent
b9c4fc93d7
commit
3227c4ecea
|
@ -46,7 +46,7 @@ module Jekyll
|
||||||
# Returns the _unsanitizied_ String URL
|
# Returns the _unsanitizied_ String URL
|
||||||
def generate_url
|
def generate_url
|
||||||
@placeholders.inject(@template) do |result, token|
|
@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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue