Module: Notee::ViewHelper

Defined in:
lib/notee/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#notee_content(text) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/notee/view_helper.rb', line 5

def notee_content(text)

  unless @markdown
    renderer = Redcarpet::Render::HTML.new(filter_html: true, hard_wrap: true)
    @markdown = Redcarpet::Markdown.new(renderer, :fenced_code_blocks => true, :highlight => true)
  end

  @markdown.render(text).html_safe
end