Merge pull request #6 from nnako/master
FIX: enable error-free string output for Python v2 and v3
This commit is contained in:
commit
b151d377b2
1 changed files with 6 additions and 1 deletions
|
|
@ -238,7 +238,12 @@ class DiffHtmlFormatter(HtmlFormatter):
|
||||||
for t, line in inner:
|
for t, line in inner:
|
||||||
if t:
|
if t:
|
||||||
lncount += 1
|
lncount += 1
|
||||||
dummyoutfile.write(unicode(line))
|
|
||||||
|
# compatibility Python v2/v3
|
||||||
|
if sys.version_info > (3,0):
|
||||||
|
dummyoutfile.write(line)
|
||||||
|
else:
|
||||||
|
dummyoutfile.write(unicode(line))
|
||||||
|
|
||||||
fl = self.linenostart
|
fl = self.linenostart
|
||||||
mw = len(str(lncount + fl - 1))
|
mw = len(str(lncount + fl - 1))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue