class Minidown::Parser

Public Class Methods

new(options = {}) click to toggle source
# File lib/minidown/parser.rb, line 3
def initialize options = {}
  @options = options.freeze
end

Public Instance Methods

render(str) click to toggle source
# File lib/minidown/parser.rb, line 7
def render str
  parse(str).to_html
end

Protected Instance Methods

parse(str) click to toggle source
# File lib/minidown/parser.rb, line 12
def parse str
  lines = str.split Utils::Regexp[:lines]
  doc = Document.new lines, @options
  doc.parse
  doc
end