Storage for the user data associated with each line.
Syntax highlighter that uses Pygments for parsing.
Highlight a block of text.
Sets the style to the specified Pygments style.
Sets a CSS stylesheet. The classes in the stylesheet should correspond to those generated by:
pygmentize -S <style> -f html
Note that ‘set_style’ and ‘set_style_sheet’ completely override each other, i.e. they cannot be used in conjunction.
Split text into (tokentype, text) pairs.
Monkeypatched to store the final stack on the object itself.
The text parameter this gets passed is only the current line, so to highlight things like multiline strings correctly, we need to retrieve the state from the previous line (this is done in PygmentsHighlighter, below), and use it to continue processing the current line.