I’m using Redcarpet for HAML markdown:
module Haml::Filters
remove_filter("Markdown")
module Markdown
include Haml::Filters::Base
def render text
markdown.render text
end
private
def markdown
@markdown ||= Redcarpet::Markdown.new MarkdownRenderer, {fenced_code_blocks: true}
end
end
end
Is there a way of accessing the Middleman application configuration inside this module? I’d like to be able so save the Redcarpet options using set
in order to be able to access them somewhere else, too:
set :markdown_options, {fenced_code_blocks: true}