From dd0836b9d5fb38cd6835472ddae6bc2a0c930b77 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Wed, 30 Nov 2011 10:11:08 -0800 Subject: [PATCH] maruku is abandonware, default to rdiscount --- fixtures/test-app/config.rb | 1 - lib/middleman/base.rb | 2 +- lib/middleman/renderers/markdown.rb | 10 +++------- middleman.gemspec | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/fixtures/test-app/config.rb b/fixtures/test-app/config.rb index 01a2e2d8..ba01ed9e 100644 --- a/fixtures/test-app/config.rb +++ b/fixtures/test-app/config.rb @@ -1,4 +1,3 @@ -require "maruku" require "slim" require "liquid" require "coffee-filter" diff --git a/lib/middleman/base.rb b/lib/middleman/base.rb index 025649c6..630d0f4e 100644 --- a/lib/middleman/base.rb +++ b/lib/middleman/base.rb @@ -251,7 +251,7 @@ class Middleman::Base self.class.superclass.defaults.each { |k,v| set(k,v) } # Evaluate a passed block if given - yield if block_given? + instance_exec(&block) if block_given? # Build expanded source path once paths have been parsed set :source_dir, File.join(root, source) diff --git a/lib/middleman/renderers/markdown.rb b/lib/middleman/renderers/markdown.rb index 31dcd9aa..92803842 100644 --- a/lib/middleman/renderers/markdown.rb +++ b/lib/middleman/renderers/markdown.rb @@ -3,15 +3,11 @@ module Middleman::Renderers::Markdown def registered(app) app.set :markdown_engine, nil + # TODO: Switch to Redcarpet once Haml 3.2.0 ships begin - require "maruku" - app.set :markdown_engine, :maruku + require "rdiscount" + app.set :markdown_engine, :rdiscount rescue LoadError - begin - require "rdiscount" - app.set :markdown_engine, :rdiscount - rescue LoadError - end end app.set :markdown_engine_prefix, ::Tilt diff --git a/middleman.gemspec b/middleman.gemspec index 71c3bd9b..11393305 100644 --- a/middleman.gemspec +++ b/middleman.gemspec @@ -42,7 +42,7 @@ Gem::Specification.new do |s| # Development and test s.add_development_dependency("slim") - s.add_development_dependency("maruku") + s.add_development_dependency("rdiscount") s.add_development_dependency("coffee-filter", ["~> 0.1.1"]) s.add_development_dependency("liquid", ["~> 2.2.0"]) s.add_development_dependency("cucumber", ["~> 1.1.0"])