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

properly trim tags when adding a delimited list #144

Merged
merged 1 commit into from
Apr 29, 2019

Conversation

adamgruber
Copy link

Problem
Individual tags are not trimmed as expected when adding a delimited list.

Example

var instance = new Taggle('example');
var tagsToAdd = 'one, two, three, four';
instance.add(tagsToAdd);

instance.getTagValues(); // ['one', ' two', ' three', ' four']

// Expected tags to be trimmed => ['one', 'two', 'three', 'four']

Solution
Trim tags after splitting on delimiter if trimTags option is true.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 90.084% when pulling 3eb976b on adamgruber:trim-tags into f84dcba on okcoker:master.

@okcoker okcoker merged commit add558b into okcoker:master Apr 29, 2019
@okcoker
Copy link
Owner

okcoker commented Apr 29, 2019

Thanks @adamgruber 🔥

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

Successfully merging this pull request may close these issues.

3 participants