Support fonts with asset_path

This commit is contained in:
Ben Hollis 2013-04-06 23:39:45 -07:00
parent c602df30dd
commit de1bfc440c

View file

@ -18,7 +18,6 @@ module Middleman
app.helpers ::Padrino::Helpers::FormatHelpers
app.helpers ::Padrino::Helpers::RenderHelpers
app.helpers ::Padrino::Helpers::NumberHelpers
# app.helpers ::Padrino::Helpers::TranslationHelpers
app.helpers Helpers
@ -94,10 +93,11 @@ module Middleman
when :css then css_dir
when :js then js_dir
when :images then images_dir
when :fonts then fonts_dir
else kind.to_s
end
source = source.to_s.tr(' ', '')
ignore_extension = (kind == :images) # don't append extension
ignore_extension = (kind == :images || kind == :fonts) # don't append extension
source << ".#{kind}" unless ignore_extension || source.end_with?(".#{kind}")
asset_folder = "" if source.start_with?('/') # absolute path