Consolidate ensure_leading_slash to 2 lines.

This commit is contained in:
Parker Moore 2016-09-22 14:40:20 -07:00
parent aa86651650
commit eab6752f52
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 2 additions and 6 deletions

View File

@ -32,12 +32,8 @@ module Jekyll
private
def ensure_leading_slash(input)
return input if input.nil? || input.empty?
if input.start_with?("/")
input
else
"/#{input}"
end
return input if input.nil? || input.empty? || input.start_with?("/")
"/#{input}"
end
end