diff options
Diffstat (limited to 'tool/sync_default_gems.rb')
-rwxr-xr-x | tool/sync_default_gems.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 98894f52f4..4181b814f3 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -450,8 +450,8 @@ def message_filter(repo, sha, input: ARGF) if log and !log.empty? log.sub!(/(?<=\n)\n+\z/, '') # drop empty lines at the last conv[log] - log.sub!(/(?:(\A\s*)|\s*\n)(?=(?i:Co-authored-by:.*)*\Z)/) { - $~.begin(1) ? "#{commit_url}\n" : "\n\n#{commit_url}" + log.sub!(/(?:(\A\s*)|\s*\n)(?=((?i:Co-authored-by:.*\n)+)?\Z)/) { + ($~.begin(1) ? "" : "\n\n") + commit_url + ($~.begin(2) ? "\n" : "") } else log = commit_url |