Rubocop: Style/IndentationWidth
This commit is contained in:
parent
f9926edbc4
commit
78e9f3389e
|
@ -187,7 +187,7 @@ module Jekyll
|
||||||
# Returns the URL template to render collection's documents at.
|
# Returns the URL template to render collection's documents at.
|
||||||
def url_template
|
def url_template
|
||||||
metadata.fetch('permalink') do
|
metadata.fetch('permalink') do
|
||||||
Utils.add_permalink_suffix("/:collection/:path", site.permalink_style)
|
Utils.add_permalink_suffix("/:collection/:path", site.permalink_style)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
Utils.deep_merge_hashes!(data, other)
|
Utils.deep_merge_hashes!(data, other)
|
||||||
if data.key?('date') && !data['date'].is_a?(Time)
|
if data.key?('date') && !data['date'].is_a?(Time)
|
||||||
data['date'] = Utils.parse_date(data['date'].to_s, "Document '#{relative_path}' does not have a valid date in the YAML front matter.")
|
data['date'] = Utils.parse_date(data['date'].to_s, "Document '#{relative_path}' does not have a valid date in the YAML front matter.")
|
||||||
end
|
end
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
|
|
@ -223,7 +223,7 @@ module Jekyll
|
||||||
# Returns the filtered array of objects
|
# Returns the filtered array of objects
|
||||||
def sort(input, property = nil, nils = "first")
|
def sort(input, property = nil, nils = "first")
|
||||||
if input.nil?
|
if input.nil?
|
||||||
raise ArgumentError.new("Cannot sort a null object.")
|
raise ArgumentError.new("Cannot sort a null object.")
|
||||||
end
|
end
|
||||||
if property.nil?
|
if property.nil?
|
||||||
input.sort
|
input.sort
|
||||||
|
|
|
@ -21,7 +21,7 @@ module Jekyll
|
||||||
key, value = opt.split('=')
|
key, value = opt.split('=')
|
||||||
# If a quoted list, convert to array
|
# If a quoted list, convert to array
|
||||||
if value && value.include?("\"")
|
if value && value.include?("\"")
|
||||||
value.delete!('"')
|
value.delete!('"')
|
||||||
value = value.split
|
value = value.split
|
||||||
end
|
end
|
||||||
@highlight_options[key.to_sym] = value || true
|
@highlight_options[key.to_sym] = value || true
|
||||||
|
|
|
@ -56,7 +56,7 @@ module Jekyll
|
||||||
|
|
||||||
def validate_file_name(file)
|
def validate_file_name(file)
|
||||||
if file !~ /^[a-zA-Z0-9_\/\.-]+$/ || file =~ /\.\// || file =~ /\/\./
|
if file !~ /^[a-zA-Z0-9_\/\.-]+$/ || file =~ /\.\// || file =~ /\/\./
|
||||||
raise ArgumentError.new <<-eos
|
raise ArgumentError.new <<-eos
|
||||||
Invalid syntax for include tag. File contains invalid characters or sequences:
|
Invalid syntax for include tag. File contains invalid characters or sequences:
|
||||||
|
|
||||||
#{file}
|
#{file}
|
||||||
|
|
Loading…
Reference in New Issue