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

dynamically allocate space for JQ_COLORS #3282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SArpnt
Copy link
Contributor

@SArpnt SArpnt commented Mar 3, 2025

this allows for larger escapes, so you can fit in full rgb foregrounds, background, underlines, and whatever else into every color. only one allocation is used and it only allocates what's needed.

the function should work if called multiple times, i set it up this way only because it seemed to already be set up with that in mind. if that's not needed i can make another commit to throw out unnecessary bits.

you may want to write a few more tests, i didn't bother.

resolves #2426

@SArpnt SArpnt changed the title dynamically allocate space for JQ_COLORS dynamically allocate space for JQ_COLORS (#2426) Mar 3, 2025
valid color escapes can be over 100 characters long,
so a static buffer isn't a good option.

resolves jqlang#2426
@SArpnt SArpnt changed the title dynamically allocate space for JQ_COLORS (#2426) dynamically allocate space for JQ_COLORS Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JQ_COLORS truecolor support
1 participant