class Carte::Server

Constants

VERSION

Public Instance Methods

config() click to toggle source
# File lib/carte/server.rb, line 27
def config
  @config ||= settings.default.update(settings.carte)
end
json_data() click to toggle source
# File lib/carte/server.rb, line 31
def json_data
  request.body.rewind
  JSON.parse(request.body.read)
end
markdown2html(markdown) click to toggle source
# File lib/carte/server.rb, line 61
def markdown2html(markdown)
  renderer = Redcarpet::Render::HTML.new(filter_html:true)
  html = Redcarpet::Markdown.new(renderer, autolink: true).render(markdown)
  parse_card_link(html)
end