module Middleman::Util
def step_through_extensions(path)
def step_through_extensions(path) while (ext = File.extname(path)) break if ext.empty? || !::Middleman::Util.tilt_class(ext) yield ext if block_given? # Strip templating extensions as long as Tilt knows them path = path[0..-(ext.length + 1)] end yield ::File.extname(path) if block_given? path end