-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
ANSI color code rendering in output #894
Comments
Do you have an example package for us to test? Since we don't support stdout, I'm not sure if there's enough reason to add it |
IIRC this came up on Slack with a reference to MLJ.jl, but technically outputting ANSI color codes in |
Hmmmmm but we also have HTML! Who wants ANSI colors if you can have |
True true. This is only relevant for code ignorant of the (questionable) beauty of HTML ;) |
I don't think it's worth the effort! But counterexamples are welcome |
So, if you are writing applications that normally work with the terminal, ANSI colours are rather obvious thing to do. Converting pre-formatted text + ANSI colours to HTML, like Jupyter does, seems like an obvious gap that Pluto has. Asking each library to write their own HTML formatter to get colour seems... like the wrong separation of concerns. ... Here is concrete use case for FunSQL.jl -- when you use the console, in the display of
If you type this same into Pluto, you'll notice that the display of |
Take a peek at how we supported colour in the package installation terminal: https://github.com/fonsp/Pluto.jl/blob/main/frontend/components/PkgTerminalView.js |
Adding a vote for terminal color support. For user experience, there are only positives:
As an example of the latter, here's BifurcationKit.jl; compare the raw output to the one that's captured from stdout using |
It should be easy to implement! Take a look at how we implemented color in https://github.com/fonsp/Pluto.jl/blob/main/frontend/components/PkgTerminalView.js for inspiration, feel free to make a PR! |
Would be cool to render ANSI color codes in text (and maybe even rich) output.
The text was updated successfully, but these errors were encountered: