

def _get_format_from_document(self, token, document):
    ' Returns a QTextCharFormat for token by \n        '
    (code, html) = next(self._formatter._format_lines([(token, 'dummy')]))
    self._document.setHtml(token)
    return QtGui.QTextCursor(self._document).charFormat()

dataset/ETHPy150Open ipython/ipython-py3k/IPython/frontend/qt/console/pygments_highlighter.py PygmentsHighlighter._get_format_from_document/VarMisuse@46/78 `html`->`token`