Skip to content

Commit

Permalink
fix regexp pattern of diff
Browse files Browse the repository at this point in the history
  • Loading branch information
nurse committed Dec 12, 2023
1 parent e223dde commit 6b3abcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tool/format-release
Expand Up @@ -235,11 +235,11 @@ eom
diff.each_with_index do |line, index|
case index
when 0
line.sub!(/\A--- (.*)\t(\d+-\d+-\d+ [0-9:.]+ [\-+]\d+)\Z/) do
line.sub!(/\A--- (.*)\t(\d+-\d+-\d+ [0-9:.]+(?: [\-+]\d+)?)\Z/) do
"--- a/#{filename}\t#{$2}"
end
when 1
line.sub!(/\A\+\+\+ (.*)\t(\d+-\d+-\d+ [0-9:.]+ [\-+]\d+)\Z/) do
line.sub!(/\A\+\+\+ (.*)\t(\d+-\d+-\d+ [0-9:.]+(?: [\-+]\d+)?)\Z/) do
"+++ b/#{filename}\t#{$2}"
end
end
Expand Down

0 comments on commit 6b3abcf

Please sign in to comment.