From 22f3f0bc8c80bcec521110b6cd15413248901610 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Sun, 10 Jul 2011 13:41:53 -0700 Subject: [PATCH] Add pref to choose prefered markdown lib --- lib/middleman/renderers/markdown.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/middleman/renderers/markdown.rb b/lib/middleman/renderers/markdown.rb index b2dbe5ff..38b213e1 100644 --- a/lib/middleman/renderers/markdown.rb +++ b/lib/middleman/renderers/markdown.rb @@ -1,12 +1,11 @@ -module Middleman - module Renderers - module Markdown - class << self - def registered(app) - require "rdiscount" - end - alias :included :registered +module Middleman::Renderers::Markdown + class << self + def registered(app) + app.set :markdown, ::Tilt::RDiscountTemplate + app.after_feature_init do + ::Tilt.prefer(app.settings.markdown) end end + alias :included :registered end end \ No newline at end of file