module Playbook::RedcarpetHelper

def markdown(text)

def markdown(text)
  options = {
    filter_html: false,
    hard_wrap: true,
    link_attributes: { rel: "nofollow", target: "_blank" },
    space_after_headers: true,
    fenced_code_blocks: true,
    no_styles: false,
    safe_links_only: true,
  }
  extensions = {
    autolink: true,
    superscript: true,
    fenced_code_blocks: true,
    tables: true,
    disable_indented_code_blocks: false,
    strikethrough: true,
    underline: true,
    highlight: true,
    footnotes: true,
    with_toc_data: true,
  }
  renderer = HTMLBlockCode.new(options)
  markdown = Redcarpet::Markdown.new(renderer, extensions)
  markdown.render(text).html_safe
end