Skip to content

bug: color is missing if I print a diff with rich.syntax #43

Closed
@15r10nk

Description

@15r10nk

Description of the bug

I use markdown-exec to include the output of pytest in my documentation.
I use rich to generate some diffs during this run and have the problem that the red and green colors are missing in the diff.

image

I was able to reproduce this bug without pytest, but I have no idea if this is a markdown-exec or rich problem.

Can you please look into?

To Reproduce

see the repository

pip install -r requirements.txt
mkdocs serve

Expected behavior

I would expect that markdown-exec is able to produce the same colors which I also see in the terminal.

Environment information

python -m markdown_exec.debug  # | xclip -selection clipboard
  • System: Linux-6.1.0-18-amd64-x86_64-with-glibc2.36
  • Python: cpython 3.12.1
  • Environment variables:
  • Installed packages:
    • markdown-exec v1.8.0

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions