table.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:python-rst2ansi 作者: Snaipe 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号