A CLI for publishing standard.site documents to ATProto sequoia.pub

astro on windows: sequoia cannot parse frontmatter because of line ending #23

Closed stevedylan.dev
Closed opened by stevedylan.dev

sequoia failed repeatedly to parse the frontmatter of my blog post.

I eventually track it down to a regex imposing ---\n, my windows files had ---\r\n

I fixed all my files to be unix style ending, so it is no longer an issue, but it might catch other ppl unaware.

Yours: 21: const frontmatterRegex = /^(---|+++|***)\n([\s\S]?)\n\1\n([\s\S])$/;

To allow windows markdown files: const frontmatterRegex = /^(---|+++|***)\r?\n([\s\S]?)\r?\n\1\r?\n([\s\S])$/;

Thanks for bringing this up; good catch! Will make a PR to update the regex

Sign up or Sign in to add to the discussion.