feat: assemble final post text

Co-Authored-By: Claude
This commit is contained in:
2026-06-19 01:56:20 +00:00
parent 55faa84f29
commit bf7f993026
2 changed files with 21 additions and 0 deletions

7
src/buildPost.ts Normal file
View File

@@ -0,0 +1,7 @@
import { Pair, serializeFrontmatter } from "./frontmatter";
export function buildPost(o: { frontmatterPairs: Pair[]; body: string }): string {
const fm = serializeFrontmatter(o.frontmatterPairs);
const body = o.body.replace(/\s+$/, "");
return `${fm}\n${body}\n`;
}