Patch output is cleaner, again :)

This commit is contained in:
echarp 2017-11-02 21:41:18 +01:00
parent e3a012fcdf
commit 1614e876d2

View File

@ -19,13 +19,21 @@ module Differ
private private
def as_insert(change) def as_insert(change)
if change.insert.start_with? ' '
change.insert[0] = '+' change.insert[0] = '+'
change.insert change.insert
else
'+ ' + change.insert
end
end end
def as_delete(change) def as_delete(change)
if change.delete.start_with? ' '
change.delete[0] = '-' change.delete[0] = '-'
change.delete change.delete
else
'- ' + change.delete
end
end end
def as_change(change) def as_change(change)