Sha256: c284321766e198b1092fbb429209fee10f3439a9e8dbb876bf25b22bff325e93
Contents?: true
Size: 510 Bytes
Versions: 5
Compression:
Stored size: 510 Bytes
Contents
module HoboFields module Types class RawMarkdownString < HoboFields::Types::Text @@markdown_class = case when defined?(RDiscount) RDiscount when defined?(Kramdown) Kramdown::Document when defined?(Maruku) Maruku else Markdown end HoboFields.register_type(:raw_markdown, self) def to_html(xmldoctype = true) blank? ? "" : @@markdown_class.new(self).to_html.html_safe end end end end
Version data entries
5 entries across 5 versions & 1 rubygems