Comments (4)
Yes, it is difficult though because people want to be able to e.g. interpolate "crayons" and then you don't have an IO
.
I think we need to do a breaking release to clear these things up.
from crayons.jl.
I think that this is the cause of JuliaData/DataFrames.jl#2846.
In that particular issue, they are testing output by using sprint
to get the output into a string, and then checking that the output string contains the ASCII escape sequences for the colors. So in that use case, they always want the ASCII escape sequences to be included in the string, even if Julia was e.g. started with --color=no
.
cc: @bkamins
from crayons.jl.
I guess there should be a new string type to solve the string interpolation with color problem? the new string type stores the colored string as list of String
with meta info about the color (format etc.) on it?
from crayons.jl.
Now LazyString
PR is merged, maybe should consider that as a solution to this issue? Basically, when someone wants to interpolating the Crayons, always suggest to use LazyString
instead of normal ones, so we always have the context of IO when actually printing the Crayons, What do people think?
from crayons.jl.
Related Issues (20)
- Base.merge() splatting issue HOT 1
- Syntactic sugar for binary pairs HOT 2
- Outdated readme for test_xxx_colors functions HOT 4
- Use UInt8 in ANSIColor rgb fields
- The ENV checking in `print` could be expensive
- Precompilation warning on Julia nightly HOT 1
- precompile warning on 1.7.0-beta and master HOT 1
- no reset color in the crayons box HOT 1
- Problem in README.md -- shownumbers param HOT 1
- TagBot trigger issue HOT 2
- Using inv() before or after println() makes a difference
- Downcasting to `256` colors
- overriding `Base.show` with Crayon act differently than `printstyled` HOT 1
- Add option to convert Crayon to string without checking if colors are available HOT 1
- Julia 1.0 support HOT 2
- Allow using Crayon outside print statements HOT 1
- Feature request: support capitalization HOT 3
- Allow * Operator for Crayon and String
- Manual option for a Solarized-Dark-Fix
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crayons.jl.