Module: Blogit::Renderers

Defined in:
lib/blogit/renderers.rb

Class Method Summary collapse

Class Method Details

.choose_highlight_rendererObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/blogit/renderers.rb', line 2

def self.choose_highlight_renderer
  case Blogit::configuration.syntax_highlighter
  when :albino
    require "blogit/renderers/html_with_albino"
    Redcarpet::Render::HTMLWithAlbino
  when :pygments
    require "blogit/renderers/html_with_pygments"
    Redcarpet::Render::HTMLWithPygments
  else
    raise Blogit::ConfigurationError,
      "'#{Blogit.configuration.syntax_highlighter}' is not a valid renderer"
  end
end