Use indentation amount from XMLWriter.indentwhite

This commit is contained in:
Jens Kutilek 2017-01-24 13:07:20 +01:00 committed by GitHub
parent 07e4f242b8
commit bbc9f63627

View File

@ -256,7 +256,7 @@ class Program(object):
instr = assembly[i] instr = assembly[i]
if _unindentRE.match(instr): if _unindentRE.match(instr):
indent -= 1 indent -= 1
writer.write(" " + " " * indent) writer.write(writer.indentwhite * indent)
writer.write(instr) writer.write(instr)
writer.newline() writer.newline()
m = _pushCountPat.match(instr) m = _pushCountPat.match(instr)
@ -267,12 +267,12 @@ class Program(object):
j = 0 j = 0
for j in range(nValues): for j in range(nValues):
if j and not (j % 25): if j and not (j % 25):
writer.write(" " + " " * indent) writer.write(writer.indentwhite * indent)
writer.write(' '.join(line)) writer.write(' '.join(line))
writer.newline() writer.newline()
line = [] line = []
line.append(assembly[i+j]) line.append(assembly[i+j])
writer.write(" " + " " * indent) writer.write(writer.indentwhite * indent)
writer.write(' '.join(line)) writer.write(' '.join(line))
writer.newline() writer.newline()
i = i + j + 1 i = i + j + 1