class Quby::MarkdownParser

Constants

EXTENTIONS

Public Class Methods

new(source) click to toggle source
# File lib/quby/markdown_parser.rb, line 15
def initialize(source)
  @source = source || ""
end

Public Instance Methods

html_safe() click to toggle source
# File lib/quby/markdown_parser.rb, line 24
def html_safe
  to_html.html_safe
end
to_html() click to toggle source
# File lib/quby/markdown_parser.rb, line 19
def to_html
  rc_html = parser.render(@source).strip
  transform_special_text(rc_html)
end

Private Instance Methods

parser() click to toggle source
# File lib/quby/markdown_parser.rb, line 30
def parser
  @@parser ||= Redcarpet::Markdown.new(HTMLWithPants.new, EXTENTIONS)
end