Renderer: use Convertible's way of picking the last Converter's output extension

This commit is contained in:
Parker Moore 2016-01-18 11:41:47 -08:00
parent d343da61eb
commit 7d81c00b29
1 changed files with 11 additions and 1 deletions

View File

@ -25,10 +25,20 @@ module Jekyll
@output_ext ||= if document.permalink
File.extname(document.permalink)
else
converters.first.output_ext(document.extname)
if output_exts.size == 1
output_exts.last
else
output_exts[-2]
end
end
end
def output_exts
@output_exts ||= converters.map do |c|
c.output_ext(document.extname)
end.compact
end
######################
## DAT RENDER THO
######################