Permalink
Browse files

Merge pull request #3 from tmaier/master

Redcarpet 2 compatibility
  • Loading branch information...
2 parents df44919 + d8c97e5 commit 80fb5aeb0fba0ea4f293ed70618f9ac54066bd56 @josevalim josevalim committed Feb 5, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 Gemfile.lock
  2. +2 −2 lib/markerb.rb
  3. +2 −2 markerb.gemspec
View
@@ -2,7 +2,7 @@ PATH
remote: .
specs:
markerb (0.1.0)
- redcarpet
+ redcarpet (>= 2.0)
GEM
remote: http://rubygems.org/
@@ -65,7 +65,7 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
- redcarpet (1.11.2)
+ redcarpet (2.1.0)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
View
@@ -14,12 +14,12 @@ def erb_handler
def call(template)
compiled_source = erb_handler.call(template)
if template.formats.include?(:html)
- "Redcarpet.new(begin;#{compiled_source};end, *Markerb.processing_options).to_html"
+ "Redcarpet::Markdown.new(Redcarpet::Render::HTML, *Markerb.processing_options).render(begin;#{compiled_source};end)"
else
compiled_source
end
end
end
end
-ActionView::Template.register_template_handler :markerb, Markerb::Handler.new
+ActionView::Template.register_template_handler :markerb, Markerb::Handler.new
View
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
- s.add_dependency "redcarpet"
-end
+ s.add_dependency "redcarpet", ">= 2.0"
+end

0 comments on commit 80fb5ae

Please sign in to comment.