lib/emaildiff.rb in diff-0.3.3 vs lib/emaildiff.rb in diff-0.3.4
- old
+ new
@@ -42,11 +42,11 @@
module HTMLCollapsable
def diff(b)
Diff.new(self, b)
end
- def patch(diff,starttoken,endtoken)
+ def patch_email(diff,starttoken,endtoken)
newary = nil
if diff.difftype == String
newary = diff.difftype.new('')
else
newary = diff.difftype.new
@@ -61,11 +61,11 @@
if ai < mod[1]
quoted = 1
end
newary << starttoken if quoted == 1
while ai < mod[1]
- newary << diff.orig_a[ai]
+ newary << diff.orig_b[bi]
ai += 1
bi += 1
end
newary << endtoken if quoted == 1
ai += 1
@@ -73,11 +73,11 @@
if bi < mod[1]
quoted = 1
end
newary << starttoken if quoted == 1
while bi < mod[1]
- newary << diff.orig_a[ai]
+ newary << diff.orig_b[bi]
ai += 1
bi += 1
end
newary << endtoken if quoted == 1
newary << diff.orig_b[mod[1]]
@@ -91,10 +91,10 @@
if ai < self.length
quoted = 1
end
newary << starttoken if quoted == 1
while ai < self.length
- newary << diff.orig_a[ai]
+ newary << diff.orig_b[bi]
ai += 1
bi += 1
end
newary << endtoken if quoted == 1
return newary