qqhtml.py 文件源码

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

项目:qqmbr 作者: ischurov 项目源码 文件源码
def handle_quiz(self, tag: QqTag) -> str:
        """
        Uses tags: choice, correct, comment

        Example:

        \question
        Do you like qqmbr?
        \quiz
            \choice
                No.
                \comment You didn't even try!
            \choice \correct
                Yes, i like it very much!
                \comment And so do I!

        :param tag:
        :return:
        """
        if not tag.exists('md5id'):
            tag.append_child(QqTag('md5id', [self.tag_hash_id(tag)]))
        template = Template(filename=os.path.join(self.templates_dir,
                                                  "quiz.html"))
        return template.render(formatter=self, tag=tag)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号