class Tilt::CommonMarkerTemplate

def allows_script?

def allows_script?
  false
end

def evaluate(scope, locals, &block)

def evaluate(scope, locals, &block)
  doc = CommonMarker.render_doc(data, parse_options, extensions)
  doc.to_html(render_options, extensions)
end

def extensions

def extensions
  EXTENSIONS.select do |extension|
    options[extension]
  end
end

def parse_options

def parse_options
  raw_options = PARSE_OPTIONS.select do |option|
    options[option]
  end
  actual_options = raw_options.map do |option|
    OPTION_ALIAS[option] || option
  end
  if actual_options.any?
    actual_options
  else
    :DEFAULT
  end
end

def prepare

def prepare
  @engine = nil
  @output = nil
end

def render_options

def render_options
  raw_options = RENDER_OPTIONS.select do |option|
    options[option]
  end
  actual_options = raw_options.map do |option|
    OPTION_ALIAS[option] || option
  end
  if actual_options.any?
    actual_options
  else
    :DEFAULT
  end
end