whatstyle.py 文件源码

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

项目:whatstyle 作者: mikr 项目源码 文件源码
def styles_to_html(formatter, styles, condensed):
    # type: (CodeFormatter, Iterable[Style], bool) -> str
    equivalents = condense_option_values(formatter, styles, condensed)
    styletexts = [formatter.styletext(s) for s in equivalents if s]
    fragments = [cgi.escape(unistr(e)) for e in styletexts]
    or_join = unistr("------------ or ------------\n").join
    html = '<pre>' + or_join(fragments).replace('\n', '<br/>') + '</pre>'
    return html
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号