Skip to content

Commit d8d807f

Browse files
committed
📚 Fix rdoc 7.2 compatibility (section bugfix)
See ruby/rdoc#1600. Our monkeypatch bugfix is (unsurprisingly) incompatible with the actual fix released in rdoc 7.2.
1 parent 0b6129d commit d8d807f

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gem "psych", ">= 5.3.0" # 5.2.5 for Data serialization, 5.3.0 for TruffleRuby
1111

1212
gem "irb"
1313
gem "rake"
14-
gem "rdoc"
14+
gem "rdoc", ">= 7.2.0"
1515
gem "test-unit"
1616
gem "test-unit-ruby-core", git: "https://github.com/ruby/test-unit-ruby-core"
1717

rakelib/rdoc.rake

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ module RDoc::Generator
1212
end
1313
end
1414

15-
# See https://github.com/ruby/rdoc/pull/936
16-
module FixSectionComments
17-
def markup(text)
18-
@store ||= @parent&.store
19-
super
20-
end
21-
def description; markup comment end
22-
def comment; super || @comments&.first end
23-
def parse(_comment_location = nil) super() end
24-
end
25-
2615
# render "[label] data" lists as tables. adapted from "hanna-nouveau" gem.
2716
module LabelListTable
2817
def list_item_start(list_item, list_type)
@@ -51,10 +40,6 @@ class RDoc::AnyMethod
5140
prepend RDoc::Generator::NetIMAP::RemoveRedundantParens
5241
end
5342

54-
class RDoc::Context::Section
55-
prepend RDoc::Generator::NetIMAP::FixSectionComments
56-
end
57-
5843
class RDoc::Markup::ToHtml
5944
LIST_TYPE_TO_HTML[:NOTE] = ['<table class="rdoc-list note-list"><tbody>', '</tbody></table>']
6045
prepend RDoc::Generator::NetIMAP::LabelListTable

0 commit comments

Comments
 (0)