access document permalink attribute efficiently (#6740)
Merge pull request 6740
This commit is contained in:
parent
e45997fb5b
commit
8c6433bd2d
|
@ -247,8 +247,9 @@ module Jekyll
|
||||||
|
|
||||||
private
|
private
|
||||||
def permalink_ext
|
def permalink_ext
|
||||||
if document.permalink && !document.permalink.end_with?("/")
|
document_permalink = document.permalink
|
||||||
permalink_ext = File.extname(document.permalink)
|
if document_permalink && !document_permalink.end_with?("/")
|
||||||
|
permalink_ext = File.extname(document_permalink)
|
||||||
permalink_ext unless permalink_ext.empty?
|
permalink_ext unless permalink_ext.empty?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue