def first_child(self, node):
first = isinstance(node.parent[0], nodes.label) # skip label
for child in node.parent.children[first:]:
if isinstance(child, nodes.Invisible):
continue
if child is node:
return 1
break
return 0
评论列表
文章目录