Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v1_9_2_180) is shown here.
filter(comment)
public
Filter the perl markup that does the same
as the rdoc filtering. Only basic for now. Will probably need a proper
parser to cope with C<<…>> etc
# File lib/rdoc/parser/perl.rb, line 151
def filter(comment)
return '' if comment =~ /^=pod\s*$/
comment.gsub!(/^=pod/, '==')
comment.gsub!(/^=head(\d+)/) do
"=" * $1.to_i
end
comment.gsub!(/=item/, '');
comment.gsub!(/C<(.*?)>/, '<tt>\1</tt>');
comment.gsub!(/I<(.*?)>/, '<i>\1</i>');
comment.gsub!(/B<(.*?)>/, '<b>\1</b>');
comment
end