There’s currently no way to pass options through to the filter engines in Haml. The best solution for now is probably to replace the existing :markdown
filter with a new one that has the options you want.
Try adding something like this to an initializer:
module Haml::Filters
remove_filter("Markdown") #remove the existing Markdown filter
module Markdown
include Haml::Filters::Base
def render(text)
Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(with_toc_data: true)).render(text)
end
end
end