Skip to content

Add closing tags for description list terms #1226

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

Closed
wants to merge 1 commit into from
Closed
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/markup/to_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def list_item_start(list_item, list_type)
"<li>"
when :LABEL, :NOTE then
Array(list_item.label).map do |label|
"<dt>#{to_html label}\n"
"<dt>#{to_html label}</dt>\n"
end.join << "<dd>"
else
raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
Expand Down
12 changes: 6 additions & 6 deletions test/rdoc/test_rdoc_markup_to_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,21 @@ def accept_list_item_start_bullet
end

def accept_list_item_start_label
assert_equal "<dl class=\"rdoc-list label-list\"><dt>cat\n<dd>", @to.res.join
assert_equal "<dl class=\"rdoc-list label-list\"><dt>cat</dt>\n<dd>", @to.res.join
end

def accept_list_item_start_lalpha
assert_equal "<ol style=\"list-style-type: lower-alpha\"><li>", @to.res.join
end

def accept_list_item_start_note
assert_equal "<dl class=\"rdoc-list note-list\"><dt>cat\n<dd>",
assert_equal "<dl class=\"rdoc-list note-list\"><dt>cat</dt>\n<dd>",
@to.res.join
end

def accept_list_item_start_note_2
expected = <<-EXPECTED
<dl class="rdoc-list note-list"><dt><code>teletype</code>
<dl class="rdoc-list note-list"><dt><code>teletype</code></dt>
<dd>
<p>teletype description</p>
</dd></dl>
Expand All @@ -171,7 +171,7 @@ def accept_list_item_start_note_2

def accept_list_item_start_note_multi_description
expected = <<-EXPECTED
<dl class="rdoc-list note-list"><dt>label
<dl class="rdoc-list note-list"><dt>label</dt>
<dd>
<p>description one</p>
</dd><dd>
Expand All @@ -184,8 +184,8 @@ def accept_list_item_start_note_multi_description

def accept_list_item_start_note_multi_label
expected = <<-EXPECTED
<dl class="rdoc-list note-list"><dt>one
<dt>two
<dl class="rdoc-list note-list"><dt>one</dt>
<dt>two</dt>
<dd>
<p>two headers</p>
</dd></dl>
Expand Down
Loading