jonschlinkert / gray-matter

Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert
https://github.com/jonschlinkert
MIT License
3.97k stars 138 forks source link

(Request) Any way to generate "square bracket" arrays rather than lists? #155

Open humblecoder opened 1 year ago

humblecoder commented 1 year ago

It's quite possible I've missed something in the documentation, but when working with arrays, it would be nice to be able to control square bracket generation:

key1: [value1,value2,value3,value4,value5]

vs list generation:

key1:
  - value1
  - value2
  - value3
  - value4
  - value5
webketje commented 1 year ago

What benefit do you perceive in this? Readability is no doubt better when the list is expanded.