renderers.py 文件源码

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

项目:sphinx-js 作者: erikrose 项目源码 文件源码
def rst(self, partial_path, full_path, doclet, use_short_name=False):
        """Return rendered RST about an entity with the given name and doclet."""
        dotted_name = partial_path[-1] if use_short_name else _dotted_path(partial_path)

        # Render to RST using Jinja:
        env = Environment(loader=PackageLoader('sphinx_js', 'templates'))
        template = env.get_template(self._template)
        return template.render(**self._template_vars(dotted_name, full_path, doclet))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号