aplus_nodes.py 文件源码

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

项目:a-plus-rst-tools 作者: Aalto-LeTech 项目源码 文件源码
def copy(self):
        '''sphinx.util.nodes (function _new_copy) monkey-patches the Element.copy method
        to include the source and line, however, it calls the Element constructor with
        a positional argument rawsource instead of using keyword arguments.
        That is changed here so that the constructor of this class can use other
        positional parameters.
        '''
        newnode = self.__class__(self.tagname, self.attributes, self.no_write,
            self.skip_html, *self.children)
        if isinstance(self, nodes.Element):
            newnode.source = self.source
            newnode.line = self.line
        return newnode
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号