Incorrect leading spaces
Closed this issue · 6 comments
egoist commented
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!
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.
kevva commented
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 commented
@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 commented
IssueHuntBot commented
@IssueHunt has funded $80.00 to this issue. See it on IssueHunt
IssueHuntBot commented
@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