Sha256: fa3f51cd191276ff8343e82859a585b9153248a3e213ee14802b327c0834607d

Contents?: true

Size: 574 Bytes

Versions: 90

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

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

90 entries across 90 versions & 1 rubygems

Version Path
nanoc-4.13.3 lib/nanoc/filters/rdoc.rb
nanoc-4.13.2 lib/nanoc/filters/rdoc.rb
nanoc-4.13.1 lib/nanoc/filters/rdoc.rb
nanoc-4.13.0 lib/nanoc/filters/rdoc.rb
nanoc-4.12.21 lib/nanoc/filters/rdoc.rb
nanoc-4.12.20 lib/nanoc/filters/rdoc.rb
nanoc-4.12.19 lib/nanoc/filters/rdoc.rb
nanoc-4.12.18 lib/nanoc/filters/rdoc.rb
nanoc-4.12.17 lib/nanoc/filters/rdoc.rb
nanoc-4.12.16 lib/nanoc/filters/rdoc.rb
nanoc-4.12.15 lib/nanoc/filters/rdoc.rb
nanoc-4.12.14 lib/nanoc/filters/rdoc.rb
nanoc-4.12.13 lib/nanoc/filters/rdoc.rb
nanoc-4.12.12 lib/nanoc/filters/rdoc.rb
nanoc-4.12.11 lib/nanoc/filters/rdoc.rb
nanoc-4.12.10 lib/nanoc/filters/rdoc.rb
nanoc-4.12.9 lib/nanoc/filters/rdoc.rb
nanoc-4.12.8 lib/nanoc/filters/rdoc.rb
nanoc-4.12.7 lib/nanoc/filters/rdoc.rb
nanoc-4.12.6 lib/nanoc/filters/rdoc.rb