Incorporate code review feedback
This commit is contained in:
parent
98405edf61
commit
a0da18e4f8
|
@ -95,13 +95,10 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def collect_urls_case_insensitive(urls, things, destination)
|
def collect_urls_case_insensitive(urls, things, destination)
|
||||||
things.each do |thing|
|
things.inject(urls) do |memo, thing|
|
||||||
dest = thing.destination(destination)
|
dest = thing.destination(destination)
|
||||||
if urls[dest.downcase]
|
(memo[dest.downcase] ||= []) << dest
|
||||||
urls[dest.downcase] << dest
|
memo
|
||||||
else
|
|
||||||
urls[dest.downcase] = [dest]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
urls
|
urls
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue