[ruby/rdoc] Shorten commit hashes

https://github.com/ruby/rdoc/commit/5d3e153963
This commit is contained in:
Nobuyoshi Nakada 2021-01-21 21:49:00 +09:00
parent 127f735c1e
commit f3f1a666c7
2 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
def parse_entries
entries = []
@content.scan(/^commit\s+(\h+)\n *Author: *(.+)\n *Date: *(.+)\n\n((?: {4}.*\n+)*)/) do
@content.scan(/^commit\s+(\h{20})\h*\n *Author: *(.+)\n *Date: *(.+)\n\n((?: {4}.*\n+)*)/) do
entry_name, author, date, entry_body = $1, $2, $3, $4.gsub(/^ {4}/, '')
if /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+) *([-+]\d\d)(\d\d)/ =~ date
time = Time.new($1, $2, $3, $4, $5, $6, "#{$7}:#{$8}")

View File

@ -280,7 +280,7 @@ commit\ 709bed2afaee50e2ce803f87bf1ee8291bea41e3
ChangeLog
expected = [
[ "709bed2afaee50e2ce803f87bf1ee8291bea41e3",
[ "709bed2afaee50e2ce80",
[ "git <svn-admin@ruby-lang.org>",
"2021-01-21 01:03:52 +0900",
"* 2021-01-21 [ci skip]\n"]]]