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

Add option to add a space either side of ellipsis #7

Closed
danday74 opened this issue Feb 15, 2018 · 7 comments · Fixed by #10
Closed

Add option to add a space either side of ellipsis #7

danday74 opened this issue Feb 15, 2018 · 7 comments · Fixed by #10
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@danday74
Copy link

danday74 commented Feb 15, 2018

Issuehunt badges

An option to add a space either side of the ellipsis would be nice. thanks

satyarohith earned $30.00 by resolving this issue!

@danday74 danday74 changed the title option to add spaces either side of ellipsis option to add a space either side of ellipsis Feb 15, 2018
@sindresorhus
Copy link
Owner

Why? What's the use-case?

@sindresorhus sindresorhus changed the title option to add a space either side of ellipsis Add option to add a space either side of ellipsis Feb 15, 2018
@danday74
Copy link
Author

looks prettier, and CSS ellipsis has space separating it from text

@sindresorhus
Copy link
Owner

Alright. PR welcome.

@IssueHuntBot
Copy link

@IssueHunt has funded $30.00 to this issue.


@satyarohith
Copy link
Contributor

I'm working on this!

@satyarohith
Copy link
Contributor

@sindresorhus do you think this might be useful? I have completed building this but, I feel like this is not so necessary. Here are the passing tests which might give you an idea about the output:

t.is(m('unicorns', 5, {position: 'end', space: 'left'}), 'uni …');
t.is(m('unicorns', 6, {position: 'start', space: 'right'}), '… orns');
t.is(m('unicorns', 6, {position: 'middle', space: 'left'}), 'uni …s');

sindresorhus pushed a commit that referenced this issue Apr 22, 2019
@IssueHuntBot
Copy link

@sindresorhus has rewarded $27.00 to @satyarohith. See it on IssueHunt

  • 💰 Total deposit: $30.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $3.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
enhancement 🎁 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.

4 participants