equal
deleted
inserted
replaced
560 |
560 |
561 def get_uniffied_inner_diff_table(title1, title2, author1, author2, text1, text2): |
561 def get_uniffied_inner_diff_table(title1, title2, author1, author2, text1, text2): |
562 """ |
562 """ |
563 Return the inner of the html table for text1 vs text2 diff |
563 Return the inner of the html table for text1 vs text2 diff |
564 """ |
564 """ |
565 gen = unified_diff(text1.split('\n'), text2.split('\n'), n=3) |
565 gen = unified_diff(text1.replace('\r\n','\n').split('\n'), text2.replace('\r\n','\n').split('\n'), n=3) |
566 index = 0 |
566 index = 0 |
567 res = ['<table class="diff"><col class="diff-marker"/><col class="diff-content"/><col class="diff-separator"/<col class="diff-marker"/><col class="diff-content"/><tbody>'] |
567 res = ['<table class="diff"><col class="diff-marker"/><col class="diff-content"/><col class="diff-separator"/<col class="diff-marker"/><col class="diff-content"/><tbody>'] |
568 res.append('<tr><td></td><td class="diff-title">%s</td><td></td><td></td><td class="diff-title">%s</td></tr>' %(title1, title2)) |
568 res.append('<tr><td></td><td class="diff-title">%s</td><td></td><td></td><td class="diff-title">%s</td></tr>' %(title1, title2)) |
569 res.append('<tr><td></td><td class="diff-author">%s</td><td></td><td></td><td class="diff-author">%s</td></tr>' %(author1, author2)) |
569 res.append('<tr><td></td><td class="diff-author">%s</td><td></td><td></td><td class="diff-author">%s</td></tr>' %(author1, author2)) |
570 res.append('<tr><td colspan="5"></td></tr>') |
570 res.append('<tr><td colspan="5"></td></tr>') |