Support ANSI colored text in code blocks.
I would like to add support for rendering console logs containing ansi color codes using the actual colors.
I have files checked in with the *.log file extension. They are the actual console logs of a CLI that it emits during tests. Each test asserts that the console output exactly matches the contents of a specific output file. Since the CLI emits logs with color codes, these log files are readable from the console but not very readable in GitHub. [example]
I raised a similar request in Linguist and was redirected here, since Linguist does not manipulate text and would not strip out / replace the color codes.
There is a long thread on colors in markdown on #1440 which is a different feature. I saw the same feature requested there, but it's a bit buried in the comment chain.
I would like ANSI colored text in code blocks, i.e.
```ansi
[ANSI-formatted text with color escape codes]
```
which allows for pasting of ANSI terminal output, as one might obtain on Linux with
unbuffer <command with ANSI output> | xclipI know Discord's Markdown has this feature. It's handy for when programs have colored output that makes it easier to find important details, such as errors, which is something GitHub is supposed to specialize in (software development)...
Originally posted by @Zi7ar21 in #1440
Hoping GitHub will add this! Unfortunately I don't think this can actually be implemented within either markup or linguist, as explained here 😞
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
not solved
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Pretty weird that jobs run with ansi colour support but there isn't any builtin way to get such ansi coloured results into the job summaries /re https://github.blog/news-insights/product-news/supercharging-github-actions-with-job-summaries/
also closed at https://github.com/github/markup/issues/1538