You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hopefully this is a reasonable place to ask this question:
I have some program that has terminal output with ANSI color codes that nicely display color in the terminal, but will show the literal ANSI codes in the HTML output unfortunately.
As a simple example, let's say I have some python file like this:
# -*- coding: utf-8 -*-"""Plot The Marvelous Colors========================="""print('\033[94m'+"hi"+'\033[0m')
then in doc after building with sphinx gallery unfortunately I get this:
sphinxcontrib.ansi currently only supports the basic 8 ANSI foreground and background colors.
It does not support the bright-colours, with colour codes from 90 .. 97 that is used in your example above: bright-blue (94). Internally, a KeyError exception is raised which probably causes sphinx to ignore the paragraph/directive processing.
WORKAROUND:
Use the BOLD annotation instead of the BRIGHT annotation, like: "\033[34;1m COLORED_BLUE \033[0" (if possible)
Hopefully this is a reasonable place to ask this question:
I have some program that has terminal output with ANSI color codes that nicely display color in the terminal, but will show the literal ANSI codes in the HTML output unfortunately.
As a simple example, let's say I have some python file like this:
then in doc after building with sphinx gallery unfortunately I get this:
This can also be seen in the second-last cell here:
https://braindecode.org/auto_examples/plot_bcic_iv_2a_moabb_trial.html
Is this something that this package would try to handle? Or do you know where else I might ask?
The text was updated successfully, but these errors were encountered: