mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 13:23:09 +00:00
webconfig: Hack tmux's reset sequence
This is quite ugly, but in lieu of putting in a proper ansi parser (i.e. the output part of a terminal), since this is the only such sequence we have seen until now, let's just match it. Fixes #5312. [ci skip]
This commit is contained in:
parent
91a664b9fa
commit
60f8eda5c4
1 changed files with 2 additions and 1 deletions
|
@ -308,8 +308,9 @@ def ansi_to_html(val):
|
|||
reg = re.compile("""
|
||||
( # Capture
|
||||
\x1b # Escape
|
||||
[^m]+ # One or more non-'m's
|
||||
[^m]* # Zero or more non-'m's
|
||||
m # Literal m terminates the sequence
|
||||
\x0f? # HACK: A ctrl-o - this is how tmux' sgr0 ends
|
||||
) # End capture
|
||||
""", re.VERBOSE)
|
||||
separated = reg.split(val)
|
||||
|
|
Loading…
Reference in a new issue