MCPcopy Create free account
hub / github.com/ipython/ipython / _repr_html_

Method _repr_html_

IPython/lib/display.py:644–649  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

642 return self.data
643
644 def _repr_html_(self):
645 from pygments import highlight
646 from pygments.formatters import HtmlFormatter
647 fmt = HtmlFormatter()
648 style = '<style>{}</style>'.format(fmt.get_style_defs('.output_html'))
649 return style + highlight(self.data, self._get_lexer(), fmt)
650
651 def _repr_latex_(self):
652 from pygments import highlight

Calls 2

_get_lexerMethod · 0.95
formatMethod · 0.45