Skip to content

Commit

Permalink
Probably fix detecting front matter in the presence of Windows line b…
Browse files Browse the repository at this point in the history
…reaks
  • Loading branch information
irskep committed Dec 3, 2024
1 parent dbdd641 commit b8be8be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/input/parseFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function parseFrontmatter(text: string): {
text: string;
frontMatter: Record<string, unknown>;
} {
const FM_RE = /^---\n(.*?)\n---\n?/gs;
const FM_RE = /^---\r?\n(.*?)\r?\n---\r?\n?/gs;
const match = FM_RE.exec(text);

if (match) {
Expand Down

0 comments on commit b8be8be

Please sign in to comment.