```ruby
class Forest::MarkdownRenderer < Redcarpet::Render::HTML
  def self.options
    {
      autolink: true,
      no_intra_emphasis: true,
      tables: true,
      space_after_headers: true
    }
  end

  def self.render_options
    {
      hard_wrap: true,
      safe_links_only: true
    }
  end

  def postprocess(full_document)
    return full_document if full_document.blank?

    begin
      without_leading_trailing_paragraphs = Regexp.new(/\A<p>(.*)<\/p>\Z/mi).match(full_document)[1]
      unless without_leading_trailing_paragraphs.include?('<p>')
        full_document = without_leading_trailing_paragraphs
      end
    rescue StandardError => e
    end

    Redcarpet::Render::SmartyPants.render(full_document)
  end
end
```

Add parameterized name attribute to markdown header tags
user
```ruby
class Forest::MarkdownRenderer < Redcarpet::Render::HTML
  def self.options
    {
      autolink: true,
      no_intra_emphasis: true,
      tables: true,
      space_after_headers: true
    }
  end

  def self.render_options
    {
      hard_wrap: true,
      safe_links_only: true
    }
  end

  def header(text, header_level)
    sanitized_name = ActionView::Base.full_sanitizer.sanitize(text).parameterize

    "<h#{header_level} name=\"#{sanitized_name}\">#{text}</h#{header_level}>"
  end

  def postprocess(full_document)
    return full_document if full_document.blank?

    begin
      without_leading_trailing_paragraphs = Regexp.new(/\A<p>(.*)<\/p>\Z/mi).match(full_document)[1]
      unless without_leading_trailing_paragraphs.include?('<p>')
        full_document = without_leading_trailing_paragraphs
      end
    rescue StandardError => e
    end

    Redcarpet::Render::SmartyPants.render(full_document)
  end
end
```
assistant