Skip to content

Commit 11eefb2

Browse files
committed
Make each commit entries h3
1 parent 5e0a123 commit 11eefb2

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

lib/rdoc/parser/changelog.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ def parse_entries
226226
def create_entries entries
227227
# git log entries have no strictly itemized style like the old
228228
# style, just assume Markdown.
229-
entries.map do |entry, (author, date, body)|
230-
list = RDoc::Markup::List.new(:NOTE)
231-
author = RDoc::Markup::Paragraph.new(author)
232-
list << RDoc::Markup::ListItem.new(date, author)
233-
RDoc::Markdown.parse(body).parts.each {|b| list << b}
234-
list
229+
out = []
230+
entries.each do |entry, (author, date, body)|
231+
title = RDoc::Markup::Heading.new(3, "#{date} #{author}")
232+
out << title
233+
out.concat RDoc::Markdown.parse(body).parts
235234
end
235+
out
236236
end
237237
end
238238
end

test/rdoc/test_rdoc_parser_changelog.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -349,16 +349,12 @@ def test_scan_git
349349
blank_line,
350350
head(2, '2021-01-21'),
351351
blank_line,
352-
list(:NOTE,
353-
item('2021-01-21 01:03:52 +0900',
354-
para('git <svn-admin@ruby-lang.org>')),
355-
list(:BULLET, item(nil, para('2021-01-21 [ci skip]')))),
352+
head(3, '2021-01-21 01:03:52 +0900 git <svn-admin@ruby-lang.org>'),
353+
list(:BULLET, item(nil, para('2021-01-21 [ci skip]'))),
356354
head(2, '2021-01-20'),
357355
blank_line,
358-
list(:NOTE,
359-
item('2021-01-20 01:58:26 +0900',
360-
para('git <svn-admin@ruby-lang.org>')),
361-
list(:BULLET, item(nil, para('2021-01-20 [ci skip]')))))
356+
head(3, '2021-01-20 01:58:26 +0900 git <svn-admin@ruby-lang.org>'),
357+
list(:BULLET, item(nil, para('2021-01-20 [ci skip]'))))
362358

363359
expected.file = @top_level
364360

0 commit comments

Comments
 (0)