This project has since been abandoned due to my changing belief about Markdown. Markdown is just a bad format at its root, and I was misguided to try to fork it. A proper rich text format would not be a variant of Markdown. (I've also stopped hosting the Sanemark spec on my website, but you can still find it in
require "sanemark" html = Sanemark.to_html(markdown) # With options options = Sanemark::Options.new(safe: true) Sanemark.to_html(markdown, options)
||false||let HTML through according to the Sanemark spec. By default, all HTML is escaped. This option also turns off sanitization of dangerous link protocols.|
||false||Enable spoilers, delimited by >! and !<. They are inline elements that have the same precedence as asterisks.|
||false||render time spent during block parsing, inline parsing, and rendering.|
If you want to use a custom renderer, it can!
class CustomRenderer < Sanemark::Renderer def open_strong(node) end # more methods following in render. end options = Sanemark::Options.new(time: true) document = Sanemark::Parser.parse(markdown, options) renderer = CustomRenderer.new(options) html = renderer.render(document)
This should be better documented, but for now it isn't.
My cashapp tag is $yujiri.