perf(plugin-auto-frontmatter): 优化 matter生成格式
This commit is contained in:
parent
3cada0bfd2
commit
5908363aca
@ -59,6 +59,7 @@ export function autoFrontmatterPlugin({
|
||||
.stringify(data)
|
||||
.replace(/\n\s{2}/g, '\n')
|
||||
.replace(/"/g, '')
|
||||
.replace(/\s+\n/g, '\n')
|
||||
const newContent = yaml ? `${yaml}---\n${content}` : content
|
||||
|
||||
fs.writeFileSync(filepath, newContent, 'utf-8')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user