Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move glorify_extensions to Glorify::EXTENSIONS module

  • Loading branch information...
commit 0d0170fc8df592b58310354c39c7c9decb21069c 1 parent 1536077
@zzak authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.