At the moment the Markdown, Textile and Haml pages are rendered by Tilt, with the default options for each renderer. If you want to configure the renderer you need to pass it a hash of options, so we'd need a way to configure it on a per-site basis.
If we define a method that can be overriden in app.rb, that would cover it. This is untested, but it's what I've got in mind…
def convert_to_html(format, scope, text)
text = add_p_tags_to_haml(text) if @format == :haml
template = Tilt[format].new(renderer_config(@format)) { text }
template.render(scope)
end
def renderer_config(format)
{}
end
At the moment the Markdown, Textile and Haml pages are rendered by Tilt, with the default options for each renderer. If you want to configure the renderer you need to pass it a hash of options, so we'd need a way to configure it on a per-site basis.
If we define a method that can be overriden in
app.rb
, that would cover it. This is untested, but it's what I've got in mind…