##// END OF EJS Templates
mdiff: compute newlines-splitted texts within _unidiff...
Denis Laxalde -
r31267:881ed6a4 default
parent child Browse files
Show More
@@ -240,9 +240,7 b' def unidiff(a, ad, b, bd, fn1, fn2, opts'
240 240 l3 = "@@ -1,%d +0,0 @@\n" % len(a)
241 241 l = [l1, l2, l3] + ["-" + e for e in a]
242 242 else:
243 al = splitnewlines(a)
244 bl = splitnewlines(b)
245 l = list(_unidiff(a, b, al, bl, opts=opts))
243 l = list(_unidiff(a, b, opts=opts))
246 244 if not l:
247 245 return ""
248 246
@@ -257,8 +255,9 b' def unidiff(a, ad, b, bd, fn1, fn2, opts'
257 255
258 256 # creates a headerless unified diff
259 257 # t1 and t2 are the text to be diffed
260 # l1 and l2 are the text broken up into lines
261 def _unidiff(t1, t2, l1, l2, opts=defaultopts):
258 def _unidiff(t1, t2, opts=defaultopts):
259 l1 = splitnewlines(t1)
260 l2 = splitnewlines(t2)
262 261 def contextend(l, len):
263 262 ret = l + opts.context
264 263 if ret > len:
General Comments 0
You need to be logged in to leave comments. Login now