Fix dot-graph min 1

This commit is contained in:
relikd
2020-10-12 12:13:31 +02:00
parent b92de9c418
commit 215ff82d65

View File

@@ -29,7 +29,7 @@ def dotgraph(arr):
''' Needs list of (title, count, attr_str) tuples '''
def D(title, count, attr_str=''):
return '<span{0} title="{1}"><p>{1}</p>{2}</span>'.format(
attr_str, title, '<i></i>' * count)
attr_str, title, '<i></i>' * max(1, count))
return '<div class="dot-graph">' + ''.join([D(*x) for x in arr]) + '</div>'