in pelican/plugins/toc2.py [0:0]
def __str__(self):
ret = ""
if self.parent:
ret = "<a class='toc-href' href='#{0}' title='{1}'>{1}</a>".format(
self.id, self.header)
if self.children:
ret += "<ul>{}</ul>".format('{}' * len(self.children)).format(
*self.children)
if self.parent:
ret = "<li>{}</li>".format(ret)
if not self.parent:
ret = "<div id='toc'>{}</div>".format(ret)
return ret