Closed lox closed 9 years ago
We are using tput to handle escape codes for us, for example:
tput
has_tty() { stty 2>/dev/null >/dev/null } ansi_header() { if has_tty ; then echo echo >&2 -e "$(tput sgr 0 1)$(tput bold)$(tput setaf 4)--- $@$(tput sgr0)" fi } ansi_success() { if has_tty ; then echo >&2 "$(tput setaf 2)$@ ✔$(tput sgr0)" fi } ansi_failure() { if has_tty ; then echo >&2 "$(tput setaf 1)$@ ✗$(tput sgr0)" fi }
it seems that tput sgr0 outputs ESC[m, rather than the `ESC[0m'. Apparently in absence of the 0 value, 0 should be assumed.
tput sgr0
ESC[m
The result of this is that our ansi styles aren't correctly reset when converted to html.
We are using
tput
to handle escape codes for us, for example:it seems that
tput sgr0
outputsESC[m
, rather than the `ESC[0m'. Apparently in absence of the 0 value, 0 should be assumed.The result of this is that our ansi styles aren't correctly reset when converted to html.