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

Incorrect leading spaces #26

Closed
egoist opened this issue Feb 28, 2018 · 6 comments · Fixed by #30
Closed

Incorrect leading spaces #26

egoist opened this issue Feb 28, 2018 · 6 comments · Fixed by #30
Labels
bug 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@egoist
Copy link

egoist commented Feb 28, 2018

Issuehunt badges

with version 2.3.0:

// 1 leading space
require('wrap-ansi')(' a ', process.stdout.columns, {trim: false})

Out:

// 2 leading spaces
'  a '

stroncium earned $80.00 by resolving this issue!

@kevva
Copy link
Contributor

kevva commented Mar 1, 2018

I think we need to make sure that we aren't in the beginning of a line with a '' character here https://github.com/chalk/wrap-ansi/blob/master/index.js#L94-L103.

@bcoe
Copy link
Contributor

bcoe commented Mar 4, 2018

@egoist this definitely seems wrong to me too. Could I convince you to add a failing test? Would also happily help you land a fix, if you decide you're interested in taking on this issue.

@sindresorhus
Copy link
Member

@IssueHuntBot
Copy link

IssueHuntBot commented Feb 19, 2019

@IssueHunt has funded $80.00 to this issue. See it on IssueHunt

@chalk chalk deleted a comment from IssueHuntBot Feb 20, 2019
@Kundan28
Copy link

@egoist Try removing both the white spaces before and after 'a'.

stroncium added a commit to stroncium/wrap-ansi that referenced this issue Feb 27, 2019
sindresorhus pushed a commit that referenced this issue Mar 3, 2019
Fixes #23
Fixes #24
Fixes #25
Fixes #26
Fixes #27
@IssueHuntBot
Copy link

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

  • 💰 Total deposit: $80.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $8.00

@issuehunt-oss issuehunt-oss bot added the 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants