Methods

Class/Module Index [+]

Quicksearch

Nanoc3::Filters::RDoc

Public Instance Methods

run(content, params={}) click to toggle source

Runs the content through [RDoc::Markup](rdoc.rubyforge.org/RDoc/Markup.html). This method takes no options.

@param [String] content The content to filter

@return [String] The filtered content

# File lib/nanoc3/filters/rdoc.rb, line 11
def run(content, params={})
  begin
    # new RDoc
    require 'rdoc/markup'
    require 'rdoc/markup/to_html'
    
    ::RDoc::Markup.new.convert(content, ::RDoc::Markup::ToHtml.new)
  rescue LoadError
    # old RDoc
    require 'rdoc/markup/simple_markup'
    require 'rdoc/markup/simple_markup/to_html'

    ::SM::SimpleMarkup.new.convert(content, ::SM::ToHtml.new)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.