remove trailing white-spaces from lib/diff.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6469 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
75ce76cd74
commit
aa35ef4be8
|
@ -9,14 +9,14 @@ module RedmineDiff
|
||||||
afinish = a.length-1
|
afinish = a.length-1
|
||||||
bfinish = b.length-1
|
bfinish = b.length-1
|
||||||
mvector = []
|
mvector = []
|
||||||
|
|
||||||
# First we prune off any common elements at the beginning
|
# First we prune off any common elements at the beginning
|
||||||
while (astart <= afinish && bstart <= afinish && a[astart] == b[bstart])
|
while (astart <= afinish && bstart <= afinish && a[astart] == b[bstart])
|
||||||
mvector[astart] = bstart
|
mvector[astart] = bstart
|
||||||
astart += 1
|
astart += 1
|
||||||
bstart += 1
|
bstart += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
# now the end
|
# now the end
|
||||||
while (astart <= afinish && bstart <= bfinish && a[afinish] == b[bfinish])
|
while (astart <= afinish && bstart <= bfinish && a[afinish] == b[bfinish])
|
||||||
mvector[afinish] = bfinish
|
mvector[afinish] = bfinish
|
||||||
|
@ -27,7 +27,7 @@ module RedmineDiff
|
||||||
bmatches = b.reverse_hash(bstart..bfinish)
|
bmatches = b.reverse_hash(bstart..bfinish)
|
||||||
thresh = []
|
thresh = []
|
||||||
links = []
|
links = []
|
||||||
|
|
||||||
(astart..afinish).each { |aindex|
|
(astart..afinish).each { |aindex|
|
||||||
aelem = a[aindex]
|
aelem = a[aindex]
|
||||||
next unless bmatches.has_key? aelem
|
next unless bmatches.has_key? aelem
|
||||||
|
@ -118,7 +118,7 @@ module RedmineDiff
|
||||||
@difftype = diffs_or_a.class
|
@difftype = diffs_or_a.class
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def match(ai, bi)
|
def match(ai, bi)
|
||||||
@diffs.push @curdiffs unless @curdiffs.empty?
|
@diffs.push @curdiffs unless @curdiffs.empty?
|
||||||
@curdiffs = []
|
@curdiffs = []
|
||||||
|
|
Loading…
Reference in New Issue