def visit_paragraph(self, node):
first_line = node.astext().split('\n')[0]
# handle weird table sizing from simple rst tables
# disregard cells spanning multiple columns, as
# these don't contribute to the cell width calculation
if len(first_line) >= self.width:
self.width = len(first_line) + 2
sublines = wrap(node.astext(), width = self.width)
self.height = int(len(sublines) / self.rows)
raise nodes.StopTraversal
评论列表
文章目录