The function uses strip_ansi() which in turn depends on _ansi_re regex: https://github.com/pallets/click/blob/master/click/_compat.py#L18
The pattern is: r'\033\[((?:\d|;)*)([a-zA-Z])'.
It is a little not full: \033[?25l and \033[?25h ANSI sequences used by cursor show/hide are not covered by the pattern.
I've changed it to r'\033\[([;\?0-9]*)([a-zA-Z])', it fixes my problem.
The function uses
strip_ansi()which in turn depends on_ansi_reregex: https://github.com/pallets/click/blob/master/click/_compat.py#L18The pattern is:
r'\033\[((?:\d|;)*)([a-zA-Z])'.It is a little not full:
\033[?25land\033[?25hANSI sequences used by cursor show/hide are not covered by the pattern.I've changed it to
r'\033\[([;\?0-9]*)([a-zA-Z])', it fixes my problem.