summaryrefslogtreecommitdiffstats
path: root/lib/diff.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diff.rb')
-rw-r--r--lib/diff.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/diff.rb b/lib/diff.rb
index f88e7fbb1..a80ef4d14 100644
--- a/lib/diff.rb
+++ b/lib/diff.rb
@@ -9,14 +9,14 @@ module RedmineDiff
afinish = a.length-1
bfinish = b.length-1
mvector = []
-
+
# First we prune off any common elements at the beginning
while (astart <= afinish && bstart <= afinish && a[astart] == b[bstart])
mvector[astart] = bstart
astart += 1
bstart += 1
end
-
+
# now the end
while (astart <= afinish && bstart <= bfinish && a[afinish] == b[bfinish])
mvector[afinish] = bfinish
@@ -27,7 +27,7 @@ module RedmineDiff
bmatches = b.reverse_hash(bstart..bfinish)
thresh = []
links = []
-
+
(astart..afinish).each { |aindex|
aelem = a[aindex]
next unless bmatches.has_key? aelem
@@ -118,7 +118,7 @@ module RedmineDiff
@difftype = diffs_or_a.class
end
end
-
+
def match(ai, bi)
@diffs.push @curdiffs unless @curdiffs.empty?
@curdiffs = []