class RDoc::Parser::Simple

def initialize(top_level, file_name, content, options, stats)

def initialize(top_level, file_name, content, options, stats)
  super
  preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include
  preprocess.handle @content, @top_level
end

def remove_coding_comment text

def remove_coding_comment text
  text.sub(/\A# .*coding[=:].*$/, '')
end

def remove_private_comment comment

def remove_private_comment comment
  # Workaround for gsub encoding for Ruby 1.9.2 and earlier
  empty = ''
  empty.force_encoding comment.encoding if Object.const_defined? :Encoding
  comment = comment.gsub(%r%^--\n.*?^\+\+\n?%m, empty)
  comment.sub(%r%^--\n.*%m, empty)
end

def scan

def scan
  comment = remove_coding_comment @content
  comment = remove_private_comment comment
  comment = RDoc::Comment.new comment, @top_level
  @top_level.comment = comment
  @top_level
end