class Bookshelf::Markdown

Constants

MARKDOWN_LIBRARIES

Supported Markdown libraries

Public Class Methods

engine() click to toggle source

Retrieve preferred Markdown processor.

# File lib/bookshelf/adapters/markdown.rb, line 7
def self.engine
  @engine ||= Object.const_get(MARKDOWN_LIBRARIES.find {|lib| Object.const_defined?(lib)})
end
to_html(content) click to toggle source

Convert Markdown to HTML.

# File lib/bookshelf/adapters/markdown.rb, line 12
def self.to_html(content)
  engine.new(content).to_html
end