chalk / slice-ansi

Slice a string with ANSI escape codes
MIT License
47 stars 21 forks source link

Adds extra escape when there's a space at the end #24

Closed vadimdemedes closed 4 years ago

vadimdemedes commented 5 years ago

Issuehunt badges

For some reason when there's a space or multiple spaces at the end, slice-ansi adds closing escape (\u001b[39m) at the end of the string. I opened https://github.com/chalk/slice-ansi/pull/23 with a failing test, which consistently reproduces the issue.


IssueHunt Summary #### [tiagodanin tiagodanin](https://issuehunt.io/u/tiagodanin) has been rewarded. ### Backers (Total: $80.00) - [issuehunt issuehunt](https://issuehunt.io/u/issuehunt) ($80.00) ### Submitted pull Requests - [#25 [WIP] Get all ansi escape sequences](https://issuehunt.io/r/chalk/slice-ansi/pull/25) --- ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/chalk/slice-ansi/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)
IssueHuntBot commented 5 years ago

@issuehunt has funded $80.00 to this issue.


issuehunt-oss[bot] commented 4 years ago

@sindresorhus has rewarded $72.00 to @tiagodanin. See it on IssueHunt