aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/parser/c.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/parser/c.rb')
-rw-r--r--lib/rdoc/parser/c.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb
index a0282d69f1..3da1820c50 100644
--- a/lib/rdoc/parser/c.rb
+++ b/lib/rdoc/parser/c.rb
@@ -645,9 +645,7 @@ class RDoc::Parser::C < RDoc::Parser
meth_obj.call_seq = $1.strip
end
- if comment.sub!(/\s*:(nodoc|doc|yields?|args?):\s*(.*)/, '') then
- RDoc::Parser.process_directive meth_obj, $1, $2
- end
+ look_for_directives_in meth_obj, comment
end
##
@@ -913,12 +911,10 @@ class RDoc::Parser::C < RDoc::Parser
# * :title: My Awesome Project
# */
#
- # This routine modifies its parameter
-
- def look_for_directives_in(context, comment)
- preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include
+ # This method modifies the +comment+
- preprocess.handle comment, context do |directive, param|
+ def look_for_directives_in context, comment
+ @preprocess.handle comment, context do |directive, param|
case directive
when 'main' then
@options.main_page = param