mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08: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
@ -308,8 +308,9 @@ def ansi_to_html(val):
|
|||||||
reg = re.compile("""
|
reg = re.compile("""
|
||||||
( # Capture
|
( # Capture
|
||||||
\x1b # Escape
|
\x1b # Escape
|
||||||
[^m]+ # One or more non-'m's
|
[^m]* # Zero or more non-'m's
|
||||||
m # Literal m terminates the sequence
|
m # Literal m terminates the sequence
|
||||||
|
\x0f? # HACK: A ctrl-o - this is how tmux' sgr0 ends
|
||||||
) # End capture
|
) # End capture
|
||||||
""", re.VERBOSE)
|
""", re.VERBOSE)
|
||||||
separated = reg.split(val)
|
separated = reg.split(val)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user