remove unnecessary Jekyll::Page constant (#6770)

Merge pull request 6770
This commit is contained in:
Ashwin Maroli 2018-05-01 00:30:58 +05:30 committed by jekyllbot
parent c60dd66db5
commit cf6d60b145
1 changed files with 2 additions and 4 deletions

View File

@ -11,8 +11,6 @@ module Jekyll
alias_method :extname, :ext
FORWARD_SLASH = "/".freeze
# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w(
content
@ -64,11 +62,11 @@ module Jekyll
#
# Returns the String destination directory.
def dir
if url.end_with?(FORWARD_SLASH)
if url.end_with?("/")
url
else
url_dir = File.dirname(url)
url_dir.end_with?(FORWARD_SLASH) ? url_dir : "#{url_dir}/"
url_dir.end_with?("/") ? url_dir : "#{url_dir}/"
end
end