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

"Found extraneous } in Chalk template literal" #736

Closed
decahedron1 opened this issue Feb 6, 2022 · 1 comment
Closed

"Found extraneous } in Chalk template literal" #736

decahedron1 opened this issue Feb 6, 2022 · 1 comment
Assignees

Comments

@decahedron1
Copy link

Been absolutely loving this library, however I've been running into one small issue. I'd like to log an error within a task, and sometimes this error contains braces that don't always close, which gets interpreted as a Chalk template and spits out this error. I tried some different methods to escape the braces but none of them seemed to work.

@decahedron1 decahedron1 changed the title Found extraneous } in Chalk template literal "Found extraneous } in Chalk template literal" Feb 6, 2022
@keindev
Copy link
Owner

keindev commented Feb 17, 2022

Thx.

If you are using braces in a formatted string, use \\ to escape it:

const task = new Task('{underline.cyan.bold \\{Awesome\\} task}');

I add description to README and append test, works fine 👍🏼

@keindev keindev closed this as completed Feb 17, 2022
@keindev keindev self-assigned this Feb 17, 2022
keindev pushed a commit that referenced this issue Feb 17, 2022
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

No branches or pull requests

2 participants