Skip to content

Commit 8eb91ac

Browse files
committed
Remove unnecessary characters accidentally added to regex
1 parent 6da2118 commit 8eb91ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/services/contents/file/parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const parseEntryFile = async ({
102102
const sd = escapeRegExp(startDelimiter);
103103
const ed = escapeRegExp(endDelimiter);
104104
// Front matter matching: allow an empty head
105-
const regex = new RegExp(`^${sd}$\\n(?:(?<head>.*?)$\\n)?${ed}$(?:\\n(?<body>.+))?`, 'ms');
105+
const regex = new RegExp(`^${sd}\\n(?:(?<head>.*?)\\n)?${ed}$(?:\\n(?<body>.+))?`, 'ms');
106106
const { head, body } = text.match(regex)?.groups ?? {};
107107

108108
if (!head && !body) {

0 commit comments

Comments
 (0)