in tools/cleaner.ts [166:180]
export function migrateLeadInAttribute(documents: Markdown[]): Markdown[] {
return documents.map((document) => {
if (!document.frontmatter.leadin) {
return document;
}
const hasContent = document.content && document.content !== "\n";
const oldLeadin = document.frontmatter.leadin;
delete document.frontmatter.leadin;
return {
...document,
content: !hasContent ? oldLeadin : document.content,
isChanged: true,
};
});
}