Patch output is cleaner, again :)
This commit is contained in:
parent
1e369a8c41
commit
43cb4b9270
@ -19,13 +19,21 @@ module Differ
|
|||||||
private
|
private
|
||||||
|
|
||||||
def as_insert(change)
|
def as_insert(change)
|
||||||
change.insert[0] = '+'
|
if change.insert.start_with? ' '
|
||||||
change.insert
|
change.insert[0] = '+'
|
||||||
|
change.insert
|
||||||
|
else
|
||||||
|
'+ ' + change.insert
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def as_delete(change)
|
def as_delete(change)
|
||||||
change.delete[0] = '-'
|
if change.delete.start_with? ' '
|
||||||
change.delete
|
change.delete[0] = '-'
|
||||||
|
change.delete
|
||||||
|
else
|
||||||
|
'- ' + change.delete
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def as_change(change)
|
def as_change(change)
|
||||||
|
Loading…
Reference in New Issue
Block a user