markup icon indicating copy to clipboard operation
markup copied to clipboard

Support ANSI coloring in code blocks

Open ramonsmits opened this issue 3 years ago • 1 comments

It would be great if the following code block would support ANSI coloring:

[30m	Black Text
[31m	Red Text
[32m	Green Text
[33m	Yellow Text
[34m	Blue Text
[35m	Purple Text
[36m	Cyan Text
[37m	White Text

I tried txt, cmd, bash, shell but none seem to support this (yet..). This would be awesome for sharing log snippets and other console output.

I explicitly only want it in code blocks and not in regular markdown as I don't think it coloring must not be part of the formatting.

Maybe via for example the syntax keyword ansi if it should not be applied to all but I guess it makes sense to apply to all shell related formatters.

ramonsmits avatar Apr 22 '22 08:04 ramonsmits

This would be really useful when displaying colored terminal output, for example the output of Github Actions steps, without losing valuable information. For example, when tracking the results of a terraform plan command in a github comment (very common for PR based terraform workflows), interpreting the ASNI escape codes would make it much easier to track which resources are created, destroyed, or updated.

nightpool avatar May 05 '23 15:05 nightpool

Stale issue message

github-actions[bot] avatar Sep 03 '24 12:09 github-actions[bot]

https://github.com/github/markup/issues/1538#event-14197786204

@GitHub-Actions, can you confirm that this has been implemented, instead of you accidentally closing it as completed, rather than unplanned?

RokeJulianLockhart avatar Sep 10 '24 12:09 RokeJulianLockhart

Anyone subscribed please upvote the recreation of this issue https://github.com/github/markup/issues/1910

ramonsmits avatar Dec 10 '24 12:12 ramonsmits