Class: Jekyll::Converters::Markdown::Markright

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-markright.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Markright

Returns a new instance of Markright.



4
5
6
7
8
9
10
11
# File 'lib/jekyll-markright.rb', line 4

def initialize(config)
  require 'kramdown'
  @config = config
rescue LoadError
  STDERR.puts 'You are missing a library required for Markdown. Please run:'
  STDERR.puts '  $ [sudo] gem install kramdown'
  raise FatalException.new("Missing dependency: kramdown")
end

Instance Method Details

#convert(content) ⇒ Object



13
14
15
# File 'lib/jekyll-markright.rb', line 13

def convert(content)
  ::Kramdown::Document.new(content, @config['kramdown']).to_RTL
end