mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ef74483594
This script is called from Doxygen many times. Worth optimising. [ci skip]
14 lines
359 B
Ruby
Executable file
14 lines
359 B
Ruby
Executable file
#!ruby
|
|
# frozen_string_literal: true
|
|
|
|
# Filter for preventing Doxygen from processing RDoc comments.
|
|
# Used by the Doxygen template.
|
|
|
|
print ARGF.binmode.read.tap {|src|
|
|
src.gsub!(%r|(/\*[!*])(?:(?!\*/).)+?^\s*\*\s?\-\-\s*$(.+?\*/)|m) {
|
|
marker = $1
|
|
comment = $2
|
|
comment.sub!(%r|^\s*\*\s?\+\+\s*$.+?(\s*\*/)\z|m, '\\1')
|
|
marker + comment
|
|
}
|
|
}
|