Skip to content

Instantly share code, notes, and snippets.

@danielwe
Created February 21, 2024 21:32
Show Gist options
  • Save danielwe/0663e49fbfb2219b2230d3fe2092c097 to your computer and use it in GitHub Desktop.
Save danielwe/0663e49fbfb2219b2230d3fe2092c097 to your computer and use it in GitHub Desktop.
IOContext not properly set for `stdout`
### A Pluto.jl notebook ###
# v0.19.39
using Markdown
using InteractiveUtils
# ╔═╡ b44a82d6-d0ff-11ee-11ec-e971f708eafd
get(stdout, :color, false)
# ╔═╡ 714735da-c4dd-4968-b7af-e007701cd48f
printstyled("hello"; color=:red)
# ╔═╡ b98f3ba1-bad7-4ba6-a71b-afa960534c5f
printstyled(IOContext(stdout, :color => true), "hello"; color=:red)
# ╔═╡ Cell order:
# ╠═b44a82d6-d0ff-11ee-11ec-e971f708eafd
# ╠═714735da-c4dd-4968-b7af-e007701cd48f
# ╠═b98f3ba1-bad7-4ba6-a71b-afa960534c5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment