mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
4580394abb
format for easy wiki updates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
16 lines
379 B
Ruby
16 lines
379 B
Ruby
###
|
|
# Converts the probes.d file to redmine wiki format. Usage:
|
|
#
|
|
# ruby probes.d
|
|
|
|
File.read(ARGV[0]).scan(/\/\*.*?\*\//m).grep(/ruby/).each do |comment|
|
|
comment.gsub!(/^(\/\*|[ ]*)|\*\/$/, '').strip!
|
|
puts
|
|
comment.each_line.each_with_index do |line, i|
|
|
if i == 0
|
|
puts "=== #{line.chomp}"
|
|
else
|
|
puts line.gsub(/`([^`]*)`/, '(({\1}))')
|
|
end
|
|
end
|
|
end
|