tools: Ignore unfinished ascii escape codes.
- Ignore if the code doesn't end in 'm'.
This commit is contained in:
parent
7f9e572a18
commit
ee27439a7c
2 changed files with 7 additions and 1 deletions
|
|
@ -170,7 +170,10 @@ class TermStr(collections.UserString):
|
|||
end_index = part.index("K")
|
||||
codes = []
|
||||
else:
|
||||
end_index = part.index("m")
|
||||
try:
|
||||
end_index = part.index("m")
|
||||
except ValueError:
|
||||
continue
|
||||
codes = part[1:end_index].split(";")
|
||||
previous_code = None
|
||||
for index, code in enumerate(codes):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue