Skip to content

Commit

Permalink
Merge pull request #56 from irskep/bugfix/linebreaks
Browse files Browse the repository at this point in the history
Probably fix detecting front matter in the presence of Windows line breaks
  • Loading branch information
irskep authored Dec 3, 2024
2 parents dbdd641 + b8be8be commit cb8623a
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 cb8623a

Please sign in to comment.