Skip to content

Commit 39bfbab

Browse files
committed
Deprecate :title: direcive
1 parent 76d2202 commit 39bfbab

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/rdoc/markup/pre_process.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ def handle_directive prefix, directive, param, code_object = nil,
223223
when 'title' then
224224
@options.default_title = param if @options.respond_to? :default_title=
225225

226+
warn <<~MSG
227+
The :title: directive is deprecated and will be removed in RDoc 7.
228+
229+
Use `--title=#{param}` to specify the title displayed.
230+
If you use `RDoc::Task`, use `rdoc.title = "#{param}"` instead.
231+
MSG
232+
226233
blankline
227234
when 'yield', 'yields' then
228235
return blankline unless code_object

lib/rdoc/parser/c.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,13 @@ def look_for_directives_in context, comment
11131113
''
11141114
when 'title' then
11151115
@options.default_title = param if @options.respond_to? :default_title=
1116+
1117+
warn <<~MSG
1118+
The :title: directive is deprecated and will be removed in RDoc 7.
1119+
1120+
Use `--title=#{param}` to specify the title displayed.
1121+
If you use `RDoc::Task`, use `rdoc.title = "#{param}"` instead.
1122+
MSG
11161123
''
11171124
end
11181125
end

0 commit comments

Comments
 (0)