rust-lang / rust-playground

The Rust Playground
https://play.rust-lang.org/
Apache License 2.0
1.24k stars 207 forks source link

Colorful and stylized text in the standard output doesn't display as expected #1055

Open MStoic13 opened 5 months ago

MStoic13 commented 5 months ago

I was trying to use the ansi_term crate to color and style the output text but instead I got this in the standard output: This is colored, this is bold and this is bold and colored

I see ansi_term is a crate from the Rust cookbook and Rust Playground does have it cargo.toml https://rust-lang-nursery.github.io/rust-cookbook/cli/ansi_terminal.html?highlight=color#ansi-terminal

Here is an example in Rust Playground https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=cbbd1a66e3da6ea8e38e1b4d3bc06bb9

Any idea how I can display colored / stylized text in the output?