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
# sequence of spaces and non-alphanumeric characters replaced with a
# hyphen.
def slugify(name)
if name.nil?
def slugify(string)
if string.nil?
nil
else
name.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
string.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
end
end