1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Move RDoc --/++ directives to comments

This commit is contained in:
Nobuyoshi Nakada 2022-09-09 11:52:57 +09:00
parent 2dcaeb75ff
commit be56033248
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -48,7 +48,7 @@ class Prelude
line.rstrip!
lineno += 1
@preludes[filename] ||= result
comment = ($1 || '' if line.sub!(/(?:^|\s+)\#(?:$|[#\s](.*))/, ''))
comment = ($1 || '' if line.sub!(/(?:^|\s+)\#(?!\{)(?:$|(?:[#\s]|(?=\W))(.*))/, ''))
if !line.empty? or start_line
line << "\n"
start_line ||= lineno