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,13 +32,9 @@ module Jekyll
private private
def ensure_leading_slash(input) def ensure_leading_slash(input)
return input if input.nil? || input.empty? return input if input.nil? || input.empty? || input.start_with?("/")
if input.start_with?("/")
input
else
"/#{input}" "/#{input}"
end end
end
end end
end end