Fix tab handling

This commit is contained in:
Joscha 2019-05-05 12:17:10 +00:00
parent 8e8eeda6ad
commit c5268d799f

View file

@ -65,6 +65,12 @@ class Shaper:
if char == "\n":
x = 0
y += 1
elif char == "\t":
image.putpixel((x, y), bgcolor)
x += 1
while x % self.args.tabwidth != 0:
image.putpixel((x, y), bgcolor)
x += 1
elif char.isspace():
image.putpixel((x, y), bgcolor)
x += 1