1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/strip-rdoc.rb
yugui c09e5abeee * Doxyfile.in: new file. Template of a configuration file for
Doxygen.
  Intorduces C-level API reference generation with Doxygen.

* tool/file2lastrev.rb: wrapper script that abstracts subversion
  and git-svn.

* tool/strip-rdoc.rb: filter for preventing doxygen from processing
  rdoc comments.

* configure.in: (Doxyfile): Doxyfile is generated together with
  Makefile.
  (PACKAGE): configuration $(PACKAGE) is necessary for $(docdir).

* instruby.rb: adds a new install target 'capi'

* common.mk (capi): new target that generates C API documents with
  Doxygen.
  (install-capi): new target.
  (pre-install-capi): ditto.
  (do-install-capi): ditto.
  (post-install-capi): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22 13:19:08 +00:00

22 lines
444 B
Ruby

#!ruby
source = ARGF.read
source = source.gsub(%r{/\*\*((?!\*/).+?)\*/}m) do |comment|
comment = $1
next "/**#{comment}*/" unless /^\s*\*\s?\-\-\s*$/ =~ comment
doxybody = nil
comment.each_line do |line|
if doxybody
if /^\s*\*\s?\+\+\s*$/ =~ line
break
end
doxybody << line
else
if /^\s*\*\s?--\s*$/ =~ line
doxybody = "\n"
end
end
end
"/**#{doxybody}*/"
end
print source