coqdomain.py 文件源码

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

项目:coq-rst 作者: cpitclaudel 项目源码 文件源码
def coq_code_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
    #pylint: disable=dangerous-default-value
    """And inline role for Coq source code"""
    options['language'] = 'Coq'
    return code_role(role, rawtext, text, lineno, inliner, options, content)
    ## Too heavy:
    ## Forked from code_role to use our custom tokenizer; this doesn't work for
    ## snippets though: for example CoqDoc swallows the parentheses around this:
    ## “(a: A) (b: B)”
    # set_classes(options)
    # classes = ['code', 'coq']
    # code = utils.unescape(text, 1)
    # node = nodes.literal(rawtext, '', *highlight_using_coqdoc(code), classes=classes)
    # return [node], []

# TODO pass different languages?
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号