From 84bf736a328506fb9836141f3d70aeb1e6ad50a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ro=C5=BCek?= Date: Tue, 10 Mar 2020 21:35:05 +0800 Subject: [PATCH] fix(frontmatter): avoid dotAll flag (#28) --- src/frontmatter/frontmatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontmatter/frontmatter.ts b/src/frontmatter/frontmatter.ts index e10fa7d..e849874 100644 --- a/src/frontmatter/frontmatter.ts +++ b/src/frontmatter/frontmatter.ts @@ -96,7 +96,7 @@ export class Frontmatter implements IFrontmatter { } public static getFrontmatterBlock(value: string): Optional { - 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]; }