Class: Sendmark::Markdown

Inherits:
Object
  • Object
show all
Defined in:
lib/sendmark/markdown.rb

Instance Method Summary collapse

Constructor Details

#initialize(css_parser) ⇒ Markdown

Returns a new instance of Markdown.



3
4
5
6
# File 'lib/sendmark/markdown.rb', line 3

def initialize(css_parser)
  render = Sendmark::Render.new(css_parser: css_parser)
  @markdown = Redcarpet::Markdown.new(render)
end

Instance Method Details

#render(text) ⇒ Object



8
9
10
# File 'lib/sendmark/markdown.rb', line 8

def render(text)
  @markdown.render(text)
end