From 74612727e64444ec2225689bb170bd65b6517fa4 Mon Sep 17 00:00:00 2001 From: Felipe Date: Mon, 19 Feb 2018 14:40:27 -0300 Subject: [PATCH] Applied suggestions for PR #252 --- package.json | 6 +++--- readme.md | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 268b9f5..69889f0 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "@nasc/chalk", - "version": "2.3.1", + "name": "chalk", + "version": "2.3.0", "description": "Terminal string styling done right", "license": "MIT", - "repository": "https://github.com/felipenmoura/chalk", + "repository": "chalk/chalk", "engines": { "node": ">=4" }, diff --git a/readme.md b/readme.md index 72193d6..f8a7210 100644 --- a/readme.md +++ b/readme.md @@ -159,7 +159,7 @@ Levels are as follows: 2. 256 color support 3. Truecolor support (16 million colors) -### chalk.wrapper +### wrapper The wrapper marks the unprintable characters from style tags. A wrapper can be added to the styles, so you can escape characters or add marks to then. @@ -179,7 +179,8 @@ const ctx = new chalk.constructor({ ctx.red('foo') // outputs ">\u001B[31m\u001B[39m<" ``` -This can be specially useful when escaping characters, using it into a _PS1_ string or debugging and outputing it into different terminals/TTYs. +This can be specially useful when escaping characters, using it into a _PS1_ string or outputing it into different terminals/TTYs. + That's because _PS1_ uses the number of _printable_ characters to know the length of the string and to position the cursor. If you don't mark the colour codes as "unprintable" by using `\[` and `\]`, those characteres will be used to determine the length of the string, mispositioning the cursor. ```js