Show More
@@ -622,14 +622,14 b' def _getcompblock(leftlines, rightlines,' | |||
|
622 | 622 | return templateutil.mappinggenerator(_getcompblockgen, args=args, |
|
623 | 623 | name='comparisonline') |
|
624 | 624 | |
|
625 | def compare(tmpl, context, leftlines, rightlines): | |
|
625 | def compare(tmpl, contextnum, leftlines, rightlines): | |
|
626 | 626 | '''Generator function that provides side-by-side comparison data.''' |
|
627 | 627 | s = difflib.SequenceMatcher(None, leftlines, rightlines) |
|
628 | if context < 0: | |
|
628 | if contextnum < 0: | |
|
629 | 629 | l = _getcompblock(leftlines, rightlines, s.get_opcodes()) |
|
630 | 630 | yield tmpl.generate('comparisonblock', {'lines': l}) |
|
631 | 631 | else: |
|
632 | for oc in s.get_grouped_opcodes(n=context): | |
|
632 | for oc in s.get_grouped_opcodes(n=contextnum): | |
|
633 | 633 | l = _getcompblock(leftlines, rightlines, oc) |
|
634 | 634 | yield tmpl.generate('comparisonblock', {'lines': l}) |
|
635 | 635 |
General Comments 0
You need to be logged in to leave comments.
Login now