Sha256: 79e77250c826816d8664d3c1da94cfe3d0a09754c51d8005484b195f2869bd02
Contents?: true
Size: 550 Bytes
Versions: 5
Compression:
Stored size: 550 Bytes
Contents
module HoboFields module Types class MarkdownString < RawMarkdownString include SanitizeHtml HoboFields.register_type(:markdown, self) @@markdown_class = case when defined?(RDiscount) RDiscount when defined?(Kramdown) Kramdown::Document when defined?(Maruku) Maruku else Markdown end def to_html(xmldoctype = true) blank? ? "" : HoboFields::SanitizeHtml.sanitize(@@markdown_class.new(self).to_html) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems