gray-matter
gray-matter copied to clipboard
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, s...
It cancels throwing an error when processing the cached content. ## Steps to reproduce ```javascript import matter from 'gray-matter'; const fixture = '---whatever\nABC: XYZ\n---'; console.log('=== start'); try { matter(fixture); }...
I've spent quite a bit of time reviewing the code in https://github.com/eemeli/yaml, it's amazing. Very well done @eemeli! If someone wants to do a PR to swap js-yaml for [yaml](https://github.com/eemeli/yaml),...
I think we can return the loc of `frontmatter` in the markdown file
Sections don't seem to be documented, though it looks like they've been [supported for at least two and a half years](https://github.com/jonschlinkert/gray-matter/blame/master/index.js#L127-L129) -- I only discovered their existence by looking at...
The typings were missing the support for sections (introduced in the version 4.0)
The logic for [newline](https://github.com/jonschlinkert/gray-matter/blob/master/lib/stringify.js#L54) in stringify.js will add a newline to the end of the markdown document if it did not already exist. This is obviously a matter of opinion,...
I installed gray-matter to use with svelte/sapper, and once I did, I started getting this error message in my console. ```bash > sapper dev ✔ client (1.0s) ✔ service worker...
There is a difference from the actual implementation in the type declaration regarding the ‘excerpt’ option. ```ts excerpt?: boolean | ((input: I, options: O) => string) // string) //
Is there a way to pass global data or other kinds of data e.g. required() data in an object into the option field? That way we can just reference it...
Since Buffer is not available in the browser, when compiling without `node` types, this error is throw.