Browse Source

Patch output is cleaner, again :)

rails5
echarp 4 years ago
parent
commit
43cb4b9270
  1. 16
      lib/differ/format/patch.rb

16
lib/differ/format/patch.rb

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

Loading…
Cancel
Save