question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simplify output for nested chalk tags

See original GitHub issue

Currently, nested chalk tags in a template reset and re‑specify everything, instead of just what needs to be modified for that level of nesting.

Code

chalk`{red  red {bold  red & bold } red again }`

Expected result:

\e[31m red \e[1m red & bold \e[22m red again \e[39m

Actual result:

\e[31m red \e[39m\e[31m\e[1m red & bold \e[22m\e[39m\e[31m red again \e[39m

See also:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
sindresorhuscommented, Mar 23, 2020

⬇️

Screenshot 2020-03-23 at 19 09 06

⬆️

1reaction
sindresorhuscommented, Jul 16, 2021

I agree. It’s simply not worth the added complexity and risk of breakage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Portable Infoboxes | Portability Hub - Fandom
They can be output differently using the <format> tag. The nesting of tags is very important to keep track of as some tags...
Read more >
sharec | Yarn - Package Manager
Fixes: Nested configs paths fix if target directory is not exist. v2.1.0. Features: Sharec skip fields removed by user (#78). Fixes: Aliases for...
Read more >
7 libraries to build Node.js CLI - Yvonnick Frin
Last week, I wrote an article about building a Node.js CLI using yargs . I introduced it saying we use cli tools everyday...
Read more >
flowxo-sdk - npm
SDK for developing Flow XO Services.. Latest version: 4.6.2, last published: 2 years ago. Start using flowxo-sdk in your project by running `npm...
Read more >
Changelog - Cypress Documentation
Fixed the console output returned from clicking on an aliased intercept in the ... Cypress now properly runs the final test when nested...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found