Text containing only one delimiter is detected as empty front matter
jpreynat opened this issue · comments
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.
Actually, the issue seems worst than only that:
gm.test('---\nSome text');
// true
gm('---\nSome text');
// { content: '', data: 'Some text', isEmpty: false, excerpt: '' }