-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spaces after yaml document start cause parse failure #53
Comments
I too encounterd with this problem This can be fixed be changing var
|
Hello from @github 👋🏼 The blog team is using this library, thank you so much! Just wondering if you'd accept a pull request that fixes it? I can't promise when but I'd be happy to submit one, or try to find someone else you would. |
Probably was fixed by #54 |
We ran into it today, using the latest version (4.0.2), so I think it's not quite fixed? |
Here is a test case to reproduce the problem const frontMatter = require("front-matter"); // v4.0.2
const markdownContent = `---
foo: bar
---
content`;
console.log(frontMatter(markdownContent));
// {
// attributes: {},
// body: '--- \nfoo: bar\n---\n\ncontent',
// bodyBegin: 1
// } |
Hi @gr2m, I'll definitely take pull requests, especially if it includes a test ;) |
YAML spec allows spaces after the
---
The regex used by this package prevents that.
The text was updated successfully, but these errors were encountered: