Skip to content

Commit

Permalink
docs: #736 Add description for using braces escape in formatted string
Browse files Browse the repository at this point in the history
  • Loading branch information
keindev committed Feb 17, 2022
1 parent d2c4062 commit 5110656
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,18 @@ Promise.all(promises).then(() => {
});
```

TaskTree uses [chalk-template](https://www.npmjs.com/package/chalk-template) to style text and supports formatting as a [tagged template literal](https://www.npmjs.com/package/chalk#tagged-template-literal).
TaskTree uses [chalk-template](https://www.npmjs.com/package/chalk-template) to style text and supports formatting as a [tagged template literal](https://www.npmjs.com/package/chalk#tagged-template-literal):

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

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

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

## API

Read the [API documentation](docs/api/index.md) for more information.

0 comments on commit 5110656

Please sign in to comment.