Text containing only one delimiter is detected as empty front matter #103

Open
opened 2020-01-31 14:10:07 +00:00 by jpreynat · 1 comment
jpreynat commented 2020-01-31 14:10:07 +00:00 (Migrated from github.com)

I have a file with the following content:

---

When running it through gray-matter, or use gm.test(content), it is detected as empty front matter. It seems like an issue since both delimiters should be present to have a "valid" front matter.

I have a file with the following content: ``` --- ``` When running it through `gray-matter`, or use `gm.test(content)`, it is detected as empty front matter. It seems like an issue since both delimiters should be present to have a "valid" front matter.
jpreynat commented 2020-01-31 14:22:37 +00:00 (Migrated from github.com)

Actually, the issue seems worst than only that:

gm.test('---\nSome text');
// true
gm('---\nSome text');
// { content: '', data: 'Some text', isEmpty: false, excerpt: '' }
Actually, the issue seems worst than only that: ```js gm.test('---\nSome text'); // true ``` ```js gm('---\nSome text'); // { content: '', data: 'Some text', isEmpty: false, excerpt: '' } ```
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#103
No description provided.