Update tokenize_helper.py

main
Alexandre B A Villares 2024-06-18 12:12:13 -03:00 zatwierdzone przez GitHub
rodzic 621a2ad54e
commit e7c074245c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -33,7 +33,11 @@ def get_tokens(text_lines):
def reassemble_tokens(token_tuples, styles={}):
"""
Gets a list of "tokens tuples" from a tokenized text
and returns a list of "styled segments".
and returns text colored with ansi escape codes.
The style dict maps tokenize's token-type constants
to STYLE dict keys from the parse_ansi_strings helper
that will in turn inform the ansi formatting to be added.
"""
lines = []
current_line = ""