Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ANSI coloring in code blocks #1538

Closed
ramonsmits opened this issue Apr 22, 2022 · 4 comments
Closed

Support ANSI coloring in code blocks #1538

ramonsmits opened this issue Apr 22, 2022 · 4 comments

Comments

@ramonsmits
Copy link

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 ramonsmits changed the title Support ANSI coloring code blocks Support ANSI coloring in code blocks Apr 22, 2022
@nightpool
Copy link

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.

Copy link

github-actions bot commented Sep 3, 2024

Stale issue message

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Sep 10, 2024

#1538 (comment)

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

@ramonsmits
Copy link
Author

Anyone subscribed please upvote the recreation of this issue #1910

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants