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

better regex for replacing single quotes #263

Merged
merged 2 commits into from
Feb 25, 2016
Merged

better regex for replacing single quotes #263

merged 2 commits into from
Feb 25, 2016

Conversation

e2tha-e
Copy link
Contributor

@e2tha-e e2tha-e commented Feb 25, 2016

Addresses #250 (preliminary work)

Summary of changes:
@bmuenzenmeyer Tightening up the regex for JSON parsing parameter submission. Needed better regex for single-quote wrapped keys. Also, don't need the m flag.

@bmuenzenmeyer
Copy link
Member

Before this gets merged I'd really like to see parameter_hunter unit tests written to cover the new supported syntaxes, if any.

@e2tha-e
Copy link
Contributor Author

e2tha-e commented Feb 25, 2016

@bmuenzenmeyer To accommodate the fact the you'd have to run through a matrix of parameter options, I refactored parameter_hunter_test.js to use less repetition of the currentPattern and patternlab objects. Now, the differences between tests are more obvious, and the file overall, is more readable. Unit tests are all passing. Please review.

@bmuenzenmeyer
Copy link
Member

thanks for the cleanup and the addition tests @e2tha-e

bmuenzenmeyer pushed a commit that referenced this pull request Feb 25, 2016
better regex for replacing single quotes
@bmuenzenmeyer bmuenzenmeyer merged commit faf36a0 into pattern-lab:dev Feb 25, 2016
@e2tha-e
Copy link
Contributor Author

e2tha-e commented Feb 25, 2016

@bmuenzenmeyer On my commute to work, I realized I needed to account for more cases, so I'll be revisiting this shortly.

@e2tha-e e2tha-e deleted the parameter-json-parse branch April 9, 2016 22:13
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.

2 participants