Skip to content
Browse files

redcarpet init style

  • Loading branch information...
1 parent 93703d0 commit 3d6c97626aabac9ebc42cd1518394e30705554ad @zzak committed May 25, 2012
Showing with 5 additions and 3 deletions.
  1. +2 −2 lib/glorify.rb
  2. +3 −1 lib/glorify/template.rb
View
4 lib/glorify.rb
@@ -9,8 +9,8 @@ module Sinatra
module Glorify
module Helpers
def glorify text
- rndr = Glorify::Renderer.new
- Redcarpet::Markdown.new(rndr, Glorify::EXTENSIONS).render(text)
+ Redcarpet::Markdown.new(Glorify::Renderer.new,
+ Glorify::EXTENSIONS).render(text)
end
end
View
4 lib/glorify/template.rb
@@ -1,3 +1,4 @@
+require 'redcarpet' unless defined? Redcarpet
require 'tilt/template'
module Sinatra
@@ -12,7 +13,8 @@ def initialize_engine
end
def prepare
- @engine = Redcarpet::Markdown.new(Glorify::Renderer.new, Glorify::EXTENSIONS)
+ @engine = Redcarpet::Markdown.new(Glorify::Renderer.new,
+ Glorify::EXTENSIONS)
@output = nil
end

0 comments on commit 3d6c976

Please sign in to comment.
Something went wrong with that request. Please try again.