Some kind of unwanted caching behaviour? #159

Open
opened 2023-05-02 12:25:04 +00:00 by james-tindal · 0 comments
james-tindal commented 2023-05-02 12:25:04 +00:00 (Migrated from github.com)

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.

GrayMatter is giving me the output for a previous input instead of the actual input. [This Codesandbox](https://codesandbox.io/p/sandbox/small-bash-ikd3h3) 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, <img width="510" alt="image" src="https://user-images.githubusercontent.com/10291002/235665305-843a231a-5eb0-4002-b0fa-b4466afee0d8.png"> 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rtlabs-llm-agents/gms-gray-matter#159
No description provided.