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

Home Page:https://github.com/jonschlinkert

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some kind of unwanted caching behaviour?

james-tindal opened this issue · comments

GrayMatter is giving me the output for a previous input instead of the actual input.
This Codesandbox behaves normally

import GrayMatter from "gray-matter";
console.log(
  GrayMatter(
    "---\nmarkmap:\n  coloring: single\n---\n\n```markmap\n---\nmarkmap:\n  height: 249\n---\n# Housework\n## Main\n- [x] Dishes\n- [ ] Cleaning the bathroom\n- [ ] Change the light bulbs\n- [ ] something else\n## [x] Also work on titles\n```\n\nd\n"
  ).data
);

Output: { markmap: { coloring: 'single' }

However, if I copy and paste the same code into my Electron console,
image

So far, I can't replicate this in a simpler form.

If I change one character in the input string, it returns a normal answer.