mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 00:06:30 +01:00
Fix to color normalization end tag in Telnet.
Initial fix in #1243 does not account for empty string. Addresses a potential problem in Telnet prompt similar to IndexError in telnet.py #1306
This commit is contained in:
parent
154799f6e0
commit
ae2c2be8a1
1 changed files with 1 additions and 1 deletions
|
|
@ -309,7 +309,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
prompt = text
|
||||
if not raw:
|
||||
# processing
|
||||
prompt = ansi.parse_ansi(_RE_N.sub("", prompt) + ("|n" if prompt[-1] != "|" else "||n"),
|
||||
prompt = ansi.parse_ansi(_RE_N.sub("", prompt) + ("||n" if prompt.endswith("|") else "|n"),
|
||||
strip_ansi=nocolor, xterm256=xterm256)
|
||||
if mxp:
|
||||
prompt = mxp_parse(prompt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue