Fix formatting d6f5eefd
Heath Stewart · 2026-02-21 15:05 2 file(s) · +20 −6
packages/cli/src/lib/markdown.ts +5 −1
40 40
		raw = toml.parse(frontmatterStr) as Record<string, unknown>;
41 41
	} else {
42 42
		// Use CORE_SCHEMA to keep dates as strings rather than Date objects
43 -
		raw = (yaml.load(frontmatterStr, { schema: yaml.CORE_SCHEMA }) as Record<string, unknown>) ?? {};
43 +
		raw =
44 +
			(yaml.load(frontmatterStr, { schema: yaml.CORE_SCHEMA }) as Record<
45 +
				string,
46 +
				unknown
47 +
			>) ?? {};
44 48
	}
45 49
46 50
	// Apply field mappings to normalize to standard PostFrontmatter fields
packages/cli/test/markdown.test.ts +15 −5
79 79
---
80 80
`;
81 81
			const { rawFrontmatter } = parseFrontmatter(content);
82 -
			expect(rawFrontmatter.excerpt).toBe("This is a folded multiline string\n");
82 +
			expect(rawFrontmatter.excerpt).toBe(
83 +
				"This is a folded multiline string\n",
84 +
			);
83 85
		});
84 86
85 87
		it("parses YAML stripped folded multiline string", () => {
90 92
---
91 93
`;
92 94
			const { rawFrontmatter } = parseFrontmatter(content);
93 -
			expect(rawFrontmatter.excerpt).toBe("This is a stripped folded multiline string");
95 +
			expect(rawFrontmatter.excerpt).toBe(
96 +
				"This is a stripped folded multiline string",
97 +
			);
94 98
		});
95 99
96 100
		it("parses YAML literal multiline string", () => {
101 105
---
102 106
`;
103 107
			const { rawFrontmatter } = parseFrontmatter(content);
104 -
			expect(rawFrontmatter.excerpt).toBe("This is a literal\nmultiline string\n");
108 +
			expect(rawFrontmatter.excerpt).toBe(
109 +
				"This is a literal\nmultiline string\n",
110 +
			);
105 111
		});
106 112
107 113
		it("parses YAML kept literal multiline string", () => {
114 120
---
115 121
`;
116 122
			const { rawFrontmatter } = parseFrontmatter(content);
117 -
			expect(rawFrontmatter.excerpt).toBe("This is a kept literal\nmultiline string\n\n");
123 +
			expect(rawFrontmatter.excerpt).toBe(
124 +
				"This is a kept literal\nmultiline string\n\n",
125 +
			);
118 126
		});
119 127
120 128
		it("parses boolean true", () => {
339 347
unpublished: true
340 348
---
341 349
`;
342 -
			const { frontmatter } = parseFrontmatter(content, { draft: "unpublished" });
350 +
			const { frontmatter } = parseFrontmatter(content, {
351 +
				draft: "unpublished",
352 +
			});
343 353
			expect(frontmatter.draft).toBe(true);
344 354
		});
345 355