Correct frontmatter length measurement (#18453)
This commit is contained in:
1 parent
a9c0ce927b
commit
f2cfef1ec2
6 files changed
+84
-1
No files matched your search
@@ -106,7 +106,10 @@ function parse(text) {
|
||||
frontMatter,
|
||||
get content() {
|
||||
const { raw } = frontMatter;
|
||||
return raw.replaceAll(/[^\n]/gu, " ") + text.slice(raw.length);
|
||||
return (
|
||||
// eslint-disable-next-line require-unicode-regexp -- string length matters so intentionally not using unicode flag
|
||||
raw.replaceAll(/[^\n]/g, " ") + text.slice(raw.length)
|
||||
);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user