Replace the 'name' parameter with 'string'

This commit is contained in:
Chris Frederick 2014-09-02 13:34:44 +09:00
parent 3ca1245027
commit 702b39dec5
1 changed files with 3 additions and 3 deletions

View File

@ -109,11 +109,11 @@ module Jekyll
# Returns the given filename or title in lowercase, with every # Returns the given filename or title in lowercase, with every
# sequence of spaces and non-alphanumeric characters replaced with a # sequence of spaces and non-alphanumeric characters replaced with a
# hyphen. # hyphen.
def slugify(name) def slugify(string)
if name.nil? if string.nil?
nil nil
else else
name.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-') string.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
end end
end end