Excerpt not added if it's a substring of content #187

Open
opened 2026-06-04 05:15:17 +00:00 by scriptype · 0 comments
scriptype commented 2026-06-04 05:15:17 +00:00 (Migrated from github.com)

I call stringify like this:

matter.stringify({
  data: { whatever: 'lorem' },
  content: 'this is a new page',
  excerpt: 'a new page'
})

and the result doesn't have an excerpt:

---
whatever: lorem
---
this is a new page

If I change the excerpt to a mew page (note the 'm'), then result has excerpt:

---
whatever: lorem
---
a mew page
---
this is a new page

So, why https://github.com/jonschlinkert/gray-matter/blob/master/lib/stringify.js#L46 exactly?

I call stringify like this: ```js matter.stringify({ data: { whatever: 'lorem' }, content: 'this is a new page', excerpt: 'a new page' }) ``` and the result doesn't have an excerpt: ```md --- whatever: lorem --- this is a new page ``` If I change the excerpt to `a mew page` (note the 'm'), then result has excerpt: ```md --- whatever: lorem --- a mew page --- this is a new page ``` So, why https://github.com/jonschlinkert/gray-matter/blob/master/lib/stringify.js#L46 exactly?
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#187
No description provided.