Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Comma value in array #1103

Merged
merged 4 commits into from Feb 27, 2019
Merged

Comma value in array #1103

merged 4 commits into from Feb 27, 2019

Conversation

UziTech
Copy link
Contributor

@UziTech UziTech commented Jan 24, 2019

Description of the Change

array config type will allow an escaped comma in the value.

image

the config value will be ["1", ",", "2"]

Alternate Designs

Benefits

Comma can be used in array values.

Possible Drawbacks

none

Applicable Issues

fixes #1102
closes #1101

Copy link
Contributor

@rafeca rafeca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! LGTM ✨

values.push(val)
}
return values
}, [])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is a bit convoluted, but I cannot think of a better way to do this without lookbehind regex support (I've just tried using lookbehind regexps on Atom and it seems like its Chromium version does not support them yet).

Maybe once Atom uses Electron 3 this can be refactored 😃

@rafeca rafeca merged commit 8e8c03e into atom:master Feb 27, 2019
@rafeca rafeca self-assigned this Feb 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow comma in array setting value
3 participants