Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix section comments (in darkfish) #936

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rdoc/context/section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def marshal_load array
# Parses +comment_location+ into an RDoc::Markup::Document composed of
# multiple RDoc::Markup::Documents with their file set.

def parse
def parse _comment_location
case @comments
when String then
super
Expand Down
2 changes: 1 addition & 1 deletion lib/rdoc/generator/markup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def as_href(from_path)
# Handy wrapper for marking up this object's comment

def description
markup @comment
markup @comment || @comments&.first
end

##
Expand Down
2 changes: 1 addition & 1 deletion lib/rdoc/generator/template/darkfish/class.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</header>
<%- end -%>

<%- if section.comment then -%>
<%- if section.comment || section.comments.any? then -%>
<div>
<%= section.description %>
</div>
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def flush_left text
# Requires the including class to implement #formatter

def markup text
@store ||= @parent&.store
if @store.rdoc.options
locale = @store.rdoc.options.locale
else
Expand Down