mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
Replace the 'name' parameter with 'string'
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user