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

Update configSchema.js to allow arrays for frontmatter_delimiter #1997

Merged
merged 2 commits into from
Feb 3, 2019
Merged

Update configSchema.js to allow arrays for frontmatter_delimiter #1997

merged 2 commits into from
Feb 3, 2019

Conversation

daneden
Copy link
Contributor

@daneden daneden commented Jan 8, 2019

This change aims to resolve #1996 in which array values for frontmatter_delimiter throw an error 'frontmatter_delimiter' should be string

Summary

See #1996 for details. The schema validator appears not to have been updated in PRs #1064 & #1094 to allow for arrays per the documentation.

Test plan

Following development steps on CONTRIBUTING.md

This change aims to resolve #1996 in which array values for `frontmatter_delimiter` throw an error `'frontmatter_delimiter' should be string`
@verythorough
Copy link
Contributor

verythorough commented Jan 8, 2019

Preview proposed changes to netlifycms.org in the link below:

Built with commit 0aa3ac4

https://deploy-preview-1997--netlify-cms-www.netlify.com

@verythorough
Copy link
Contributor

verythorough commented Jan 8, 2019

Preview proposed changes to the CMS demo site in the link below:

Built with commit 0aa3ac4

https://deploy-preview-1997--cms-demo.netlify.com

@@ -96,7 +96,7 @@ const getConfigSchema = () => ({
},
format: { type: 'string', enum: Object.keys(formatExtensions) },
extension: { type: 'string' },
frontmatter_delimiter: { type: 'string' },
frontmatter_delimiter: { type: ['string', 'array'] },
Copy link
Contributor

Choose a reason for hiding this comment

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

This schema will allow an array of any type, rather than only an array of strings. It should be modified to specify that the children of arrays should be strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Benaiah good catch! Updated this in 0aa3ac4.

Copy link
Contributor

@erquhart erquhart left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@erquhart erquhart merged commit ebba686 into decaporg:master Feb 3, 2019
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.

Different Opening/Closing Custom Delimiters Not Working
4 participants