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

Unexpected trim results #28

Closed
ellioseven opened this issue Sep 8, 2016 · 2 comments
Closed

Unexpected trim results #28

ellioseven opened this issue Sep 8, 2016 · 2 comments
Labels

Comments

@ellioseven
Copy link

ellioseven commented Sep 8, 2016

Getting an issue where sassdash will be too greedy when trimming characters like so:

$key: _trim("a--b--c--", "--");
@debug "Result: " + $key;

Results in:

DEBUG: Result: s

Which should be:

DEBUG: Result: a--b--c
@davidkpiano davidkpiano added the bug label Sep 9, 2016
@P233
Copy link
Contributor

P233 commented Mar 5, 2019

@davidkpiano The __chars-index function can not help when there is more than one character. In this case, I think it's better to split the $chars to a list, and iteratively slice the candidate character from the list on both sides of the string.

@davidkpiano
Copy link
Owner

Would be happy to accept a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants