summaryrefslogtreecommitdiff
path: root/lib/rdoc/parser/changelog.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-21 21:49:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-24 16:46:21 +0900
commitf3f1a666c77f8c528b0adc9ccf78e4b9910bd6e0 (patch)
tree87df6489616f1bfcbd3fd63489d3f0d8c834d332 /lib/rdoc/parser/changelog.rb
parent127f735c1e5e0771076caf2a74390757a42fb177 (diff)
[ruby/rdoc] Shorten commit hashes
https://github.com/ruby/rdoc/commit/5d3e153963
Diffstat (limited to 'lib/rdoc/parser/changelog.rb')
-rw-r--r--lib/rdoc/parser/changelog.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/parser/changelog.rb b/lib/rdoc/parser/changelog.rb
index eca4b56ec9..d0701a6772 100644
--- a/lib/rdoc/parser/changelog.rb
+++ b/lib/rdoc/parser/changelog.rb
@@ -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}")