fix regexp pattern of diff
This commit is contained in:
parent
e223dde329
commit
6b3abcf462
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user