add support for lists
This commit is contained in:
parent
922192ebfe
commit
a071793d3c
14
uml.py
14
uml.py
|
@ -88,6 +88,7 @@ def renderer(chain):
|
|||
buf += i
|
||||
print(buf)
|
||||
elif i.element == "t":
|
||||
rendered = True
|
||||
buf = [0] * len(i.data.data[0])
|
||||
for j in i.data.data:
|
||||
c = 0
|
||||
|
@ -110,6 +111,19 @@ def renderer(chain):
|
|||
cbuf = "| " + ' | '.join(j) + " |"
|
||||
print(cbuf)
|
||||
print("+" + "-" * width + "+")
|
||||
elif i.element == "l":
|
||||
rendered = True
|
||||
buf = i.data.split(' ')
|
||||
cbuf = "* "
|
||||
for i in buf:
|
||||
if (len(cbuf) + len(i) + 1) <= 63:
|
||||
if not len(cbuf) == 2: cbuf += " "
|
||||
cbuf += i
|
||||
else:
|
||||
print(cbuf)
|
||||
cbuf = " "
|
||||
cbuf += i
|
||||
print(cbuf)
|
||||
if rendered: print()
|
||||
|
||||
chain = []
|
||||
|
|
Loading…
Reference in New Issue