File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -895,7 +895,15 @@ def close(self):
895895 """See the flush() method docstring."""
896896
897897 def tokenize (self , s , newline = False ):
898- """Tokenize a line of code."""
898+ """Tokenizes a line of code, returning pygments tokens
899+ with side effects/impurities:
900+ - reads self.cpos to see what parens should be highlighted
901+ - reads self.buffer to see what came before the passed in line
902+ - sets self.highlighted_paren to (buffer_lineno, tokens_for_that_line) for buffer line
903+ that should replace that line to unhighlight it
904+ - calls reprint_line with a buffer's line's tokens and the buffer lineno that has changed
905+ iff that line is the not the current line
906+ """
899907
900908 source = '\n ' .join (self .buffer + [s ])
901909 cursor = len (source ) - self .cpos
You can’t perform that action at this time.
0 commit comments