Skip to content

[BUG] Links in terminal maintain color, but not if we export to HTML #1009

@koaning

Description

@koaning

I'm working on a little cron-dashboard. This is what it looks like; from the terminal.

image

The idea is that my app will keep track of where all the logs are and that you can easily find the logs of the jobs that failed. But I don't just want to have users find logs in the terminal. I also want to export these to HTML. So I was super stoked when I learned rich basically just supports this.

I've printed the table via a Console which I've set to record and I've taken the liberty to also export it to HTML. This is where there is a subtle bug. Notice the subtle difference in the link-line under the red x.

image

I might imagine that we'd like to keep the colors consistent here. The link in the browser should carry the color of the parent. I think this is a bug, but if this is by design I'll gladly hear it.

Code

This is the code that is used inside the table.

f"[red][link={make_link()}.html]x[/link][/red]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions