documentation added for changes
This commit is contained in:
parent
a1591f8aaf
commit
3acc7e417c
|
@ -216,12 +216,14 @@ def _highlight(
|
|||
from pygments import highlight
|
||||
import pygments.util
|
||||
|
||||
# Terminal set to newer pygment formatters depending on user environment variables
|
||||
if os.getenv("COLORTERM", "") in ("truecolor", "24bit"):
|
||||
from pygments.formatters.terminal256 import TerminalTrueColorFormatter
|
||||
terminal_formatter = TerminalTrueColorFormatter(style=os.getenv("PYTEST_THEME", "default"))
|
||||
elif "256" in os.getenv("TERM", ""):
|
||||
from pygments.formatters.terminal256 import Terminal256Formatter
|
||||
terminal_formatter = Terminal256Formatter(style=os.getenv("PYTEST_THEME", "default"))
|
||||
# Otherwise use the terminal formatter used previously
|
||||
else:
|
||||
terminal_formatter = TerminalFormatter(bg=os.getenv("PYTEST_THEME_MODE", "dark"),
|
||||
style=os.getenv("PYTEST_THEME", "default"))
|
||||
|
|
Loading…
Reference in New Issue