def _vendor_wrap(self, colour_class, text):
"""Override in reporters that wrap snippet lines in vendor styles, e.g. pygments."""
if '-line' not in colour_class:
text = highlight(text, PythonLexer(),
HtmlFormatter(nowrap=True, lineseparator='', classprefix='pygments-'))
return text
评论列表
文章目录