Sha256: e44aa497d411034017790fa8c78194958a91dfafc127600d67affb655d9a546f
Contents?: true
Size: 812 Bytes
Versions: 14
Compression:
Stored size: 812 Bytes
Contents
# frozen_string_literal: true module ApipieDSL module Markup class RDoc def to_html(text) rdoc.convert(text) end private def rdoc @rdoc ||= begin require 'rdoc' require 'rdoc/markup/to_html' if Gem::Version.new(::RDoc::VERSION) < Gem::Version.new('4.0.0') ::RDoc::Markup::ToHtml.new() else ::RDoc::Markup::ToHtml.new(::RDoc::Options.new) end end end end class Markdown def initialize require 'maruku' end def to_html(text) Maruku.new(text).to_html end end class Textile def initialize require 'RedCloth' end def to_html(text) RedCloth.new(text).to_html end end end end
Version data entries
14 entries across 14 versions & 1 rubygems