mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
access document permalink attribute efficiently (#6740)
Merge pull request 6740
This commit is contained in:
@@ -247,8 +247,9 @@ module Jekyll
|
||||
|
||||
private
|
||||
def permalink_ext
|
||||
if document.permalink && !document.permalink.end_with?("/")
|
||||
permalink_ext = File.extname(document.permalink)
|
||||
document_permalink = document.permalink
|
||||
if document_permalink && !document_permalink.end_with?("/")
|
||||
permalink_ext = File.extname(document_permalink)
|
||||
permalink_ext unless permalink_ext.empty?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user