equal
deleted
inserted
replaced
63 if binary(text): |
63 if binary(text): |
64 mt = mimetypes.guess_type(f)[0] or 'application/octet-stream' |
64 mt = mimetypes.guess_type(f)[0] or 'application/octet-stream' |
65 text = '(binary:%s)' % mt |
65 text = '(binary:%s)' % mt |
66 |
66 |
67 def lines(): |
67 def lines(): |
68 for lineno, t in enumerate(text.splitlines(1)): |
68 for lineno, t in enumerate(text.splitlines(True)): |
69 yield {"line": t, |
69 yield {"line": t, |
70 "lineid": "l%d" % (lineno + 1), |
70 "lineid": "l%d" % (lineno + 1), |
71 "linenumber": "% 6d" % (lineno + 1), |
71 "linenumber": "% 6d" % (lineno + 1), |
72 "parity": parity.next()} |
72 "parity": parity.next()} |
73 |
73 |