[前][次][番号順一覧][スレッド一覧]

ruby-changes:12216

From: yugui <ko1@a...>
Date: Tue, 30 Jun 2009 01:39:33 +0900 (JST)
Subject: [ruby-changes:12216] Ruby:r23901 (trunk): * tool/strip-rdocs.rb: supports QT style doxy-comments.

yugui	2009-06-30 01:39:14 +0900 (Tue, 30 Jun 2009)

  New Revision: 23901

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23901

  Log:
    * tool/strip-rdocs.rb: supports QT style doxy-comments.

  Modified files:
    trunk/ChangeLog
    trunk/tool/strip-rdoc.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23900)
+++ ChangeLog	(revision 23901)
@@ -1,3 +1,7 @@
+Tue Jun 30 01:35:12 2009  Yuki Sonoda (Yugui)  <yugui@y...>
+
+	* tool/strip-rdocs.rb: supports QT style doxy-comments.
+
 Tue Jun 30 01:24:10 2009  Tadayoshi Funaba  <tadf@d...>
 
 	* lib/cmath.rb (log2, cbrt): added.  [experimental]
Index: tool/strip-rdoc.rb
===================================================================
--- tool/strip-rdoc.rb	(revision 23900)
+++ tool/strip-rdoc.rb	(revision 23901)
@@ -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 @@
       end
     end
   end
-  "/**#{doxybody}*/"
+  "/*#{marker}#{doxybody}*/"
 end
 print source

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]