Thursday, June 04, 2026 2:09:03 AM
> markdown.rb
# frozen_string_literal: true

class Markdown
  def self.to_html(markdown)
    return "" if markdown.blank?

    Kramdown::Document.new(markdown.gsub("\n", "<br>"))
      .to_html
      .gsub(/<p>|<\/p>/, "") # Remove the <p> tag that Kramdown adds
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2