Skip to content

Commit

Permalink
fix(frontmatter): avoid dotAll flag (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip authored Mar 10, 2020
1 parent 07ef92b commit 84bf736
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontmatter/frontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class Frontmatter<T extends object = any> implements IFrontmatter<T> {
}

public static getFrontmatterBlock(value: string): Optional<string> {
const match = value.match(/^(\s*\n)?---.*?\n---/s);
const match = value.match(/^(\s*\n)?---(?:.|[\n\r\u2028\u2029])*?\n---/);
return match === null ? void 0 : match[0];
}

Expand Down

0 comments on commit 84bf736

Please sign in to comment.