Permalink
Browse files

move glorify_extensions to Glorify::EXTENSIONS module

  • Loading branch information...
1 parent 1536077 commit 0d0170fc8df592b58310354c39c7c9decb21069c @zzak committed May 25, 2012
Showing with 13 additions and 6 deletions.
  1. +4 −6 lib/glorify.rb
  2. +9 −0 lib/glorify/extensions.rb
View
10 lib/glorify.rb
@@ -1,5 +1,6 @@
require "sinatra/base"
require "glorify/css"
+require "glorify/extensions"
require "glorify/version"
require "glorify/renderer"
@@ -8,17 +9,14 @@ module Glorify
module Helpers
def glorify text
rndr = Glorify::Renderer.new
- Redcarpet::Markdown.new(rndr, settings.glorify_extensions).render(text)
+ Redcarpet::Markdown.new(rndr, Glorify::EXTENSIONS).render(text)
end
end
def self.registered(app)
- app.set :glorify_extensions, { :filter_html => true,
- :autolink => true,
- :no_intra_emphasis => true,
- :fenced_code_blocks => true
- }
+ app.set :glorify_extensions, Glorify::EXTENSIONS
app.helpers Glorify::Helpers
+
app.get '/pygments.css' do
glorify_css
end
View
9 lib/glorify/extensions.rb
@@ -0,0 +1,9 @@
+module Sinatra
+ module Glorify
+ EXTENSIONS = { :filter_html => true,
+ :autolink => true,
+ :no_intra_emphasis => true,
+ :fenced_code_blocks => true
+ }
+ end
+end

0 comments on commit 0d0170f

Please sign in to comment.