зеркало из https://github.com/github/ruby.git
* tool/strip-rdocs.rb: supports QT style doxy-comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ad1d5a3c31
Коммит
d6ef893798
|
@ -1,3 +1,7 @@
|
|||
Tue Jun 30 01:35:12 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||
|
||||
* tool/strip-rdocs.rb: supports QT style doxy-comments.
|
||||
|
||||
Tue Jun 30 01:24:10 2009 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* lib/cmath.rb (log2, cbrt): added. [experimental]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!ruby
|
||||
|
||||
source = ARGF.read
|
||||
source = source.gsub(%r{/\*\*((?!\*/).+?)\*/}m) do |comment|
|
||||
comment = $1
|
||||
source = source.gsub(%r{/\*([!*])((?!\*/).+?)\*/}m) do |comment|
|
||||
marker, comment = $1, $2
|
||||
next "/**#{comment}*/" unless /^\s*\*\s?\-\-\s*$/ =~ comment
|
||||
doxybody = nil
|
||||
comment.each_line do |line|
|
||||
|
@ -17,6 +17,6 @@ source = source.gsub(%r{/\*\*((?!\*/).+?)\*/}m) do |comment|
|
|||
end
|
||||
end
|
||||
end
|
||||
"/**#{doxybody}*/"
|
||||
"/*#{marker}#{doxybody}*/"
|
||||
end
|
||||
print source
|
||||
|
|
Загрузка…
Ссылка в новой задаче