document.py 文件源码

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

项目:gns3-documentation-template 作者: GNS3 项目源码 文件源码
def _wrap_images(self):
        """
        Wrap images in a target blank
        """
        for img in self._html.iter('img'):
            img.attrib.pop('style', None)
            a = img
            a.attrib["href"] = img.attrib.pop("src", None)
            a.attrib["target"] = "_blank"
            a.tag = "a"
            img = lxml.html.builder.IMG()
            img.attrib["src"] = a.attrib["href"]
            a.append(img)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号