Sha256: c8c14f92ff41b3f74d426e9f6fc689e35b793dcd3995f29f70e3523d1497f0ef

Contents?: true

Size: 543 Bytes

Versions: 20

Compression:

Stored size: 543 Bytes

Contents

module Nanoc::Filters
  # @api private
  class RDoc < Nanoc::Filter
    identifier :rdoc

    requires 'rdoc'

    # Runs the content through [RDoc::Markup](http://docs.seattlerb.org/rdoc/RDoc/Markup.html).
    # This method takes no options.
    #
    # @param [String] content The content to filter
    #
    # @return [String] The filtered content
    def run(content, _params = {})
      options = ::RDoc::Options.new
      to_html = ::RDoc::Markup::ToHtml.new(options)
      ::RDoc::Markup.new.convert(content, to_html)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
nanoc-4.7.9 lib/nanoc/filters/rdoc.rb
nanoc-4.7.8 lib/nanoc/filters/rdoc.rb
nanoc-4.7.7 lib/nanoc/filters/rdoc.rb
nanoc-4.7.6 lib/nanoc/filters/rdoc.rb
nanoc-4.7.5 lib/nanoc/filters/rdoc.rb
nanoc-4.7.4 lib/nanoc/filters/rdoc.rb
nanoc-4.7.3 lib/nanoc/filters/rdoc.rb
nanoc-4.7.2 lib/nanoc/filters/rdoc.rb
nanoc-4.7.1 lib/nanoc/filters/rdoc.rb
nanoc-4.7.0 lib/nanoc/filters/rdoc.rb
nanoc-4.6.4 lib/nanoc/filters/rdoc.rb
nanoc-4.6.3 lib/nanoc/filters/rdoc.rb
nanoc-4.6.2 lib/nanoc/filters/rdoc.rb
nanoc-4.6.1 lib/nanoc/filters/rdoc.rb
nanoc-4.6.0 lib/nanoc/filters/rdoc.rb
nanoc-4.5.4 lib/nanoc/filters/rdoc.rb
nanoc-4.5.3 lib/nanoc/filters/rdoc.rb
nanoc-4.5.2 lib/nanoc/filters/rdoc.rb
nanoc-4.5.1 lib/nanoc/filters/rdoc.rb
nanoc-4.5.0 lib/nanoc/filters/rdoc.rb