Consolidate ensure_leading_slash to 2 lines.
This commit is contained in:
parent
aa86651650
commit
eab6752f52
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue