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鈥檒l 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rdoc/context/section.rb
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
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
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
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