Document existing ansi_re sequences and add ESC[m
(#70683)
* Document existing ansi_re sequences and add `ESC[m` * Add changelog
This commit is contained in:
parent
b7ee07215d
commit
06a4fc2833
2 changed files with 6 additions and 2 deletions
3
changelogs/fragments/70683-terminal-ansi-re.yaml
Normal file
3
changelogs/fragments/70683-terminal-ansi-re.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
bugfixes:
|
||||
- Terminal plugins - add "\e[m" to the list of ANSI sequences stripped from device output
|
|
@ -48,8 +48,9 @@ class TerminalBase(with_metaclass(ABCMeta, object)):
|
|||
|
||||
#: compiled bytes regular expressions to remove ANSI codes
|
||||
ansi_re = [
|
||||
re.compile(br'(\x1b\[\?1h\x1b=)'),
|
||||
re.compile(br'\x08.')
|
||||
re.compile(br'\x1b\[\?1h\x1b='), # CSI ? 1 h ESC =
|
||||
re.compile(br'\x08.'), # [Backspace] .
|
||||
re.compile(br"\x1b\[m"), # ANSI reset code
|
||||
]
|
||||
|
||||
#: terminal initial prompt
|
||||
|
|
Loading…
Reference in a new issue