class Solargraph::Page::Binder

def htmlify text

def htmlify text
  helper = Solargraph::Pin::Helper.new
  html = helper.html_markup_rdoc(text)
  conv = ReverseMarkdown.convert(html, github_flavored: true)
  Kramdown::Document.new(
    conv,
    input: 'GFM',
    entity_output: :symbolic,
    syntax_highlighter_opts: {
      block: {
        line_numbers: false,
      },
      default_lang: :ruby
    },
  ).to_html
end

def initialize locals, render_method

def initialize locals, render_method
  super(locals)
  define_singleton_method :render do |template, layout: false, locals: {}|
    render_method.call(template, layout: layout, locals: locals)
  end
  define_singleton_method :erb do |template, layout: false, locals: {}|
    render_method.call(template, layout: layout, locals: locals)
  end
end

def ruby_to_html code

def ruby_to_html code
  code
end