environment.py 文件源码

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

项目:chalktalk_docs 作者: loremIpsum1771 项目源码 文件源码
def _resolve_citation(self, builder, fromdocname, node, contnode):
        docname, labelid = self.citations.get(node['reftarget'], ('', ''))
        if docname:
            try:
                newnode = make_refnode(builder, fromdocname,
                                       docname, labelid, contnode)
                return newnode
            except NoUri:
                # remove the ids we added in the CitationReferences
                # transform since they can't be transfered to
                # the contnode (if it's a Text node)
                if not isinstance(contnode, nodes.Element):
                    del node['ids'][:]
                raise
        elif 'ids' in node:
            # remove ids attribute that annotated at
            # transforms.CitationReference.apply.
            del node['ids'][:]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号