Refine use cases rule examples

This commit is contained in:
adilallo
2026-05-19 22:16:08 -06:00
parent 7c46cbd87b
commit 2f2b5d0dc2
65 changed files with 3129 additions and 252 deletions
+9 -1
View File
@@ -352,5 +352,13 @@ export function parseDocumentSectionsForDisplay(
if (!document || typeof document !== "object") return [];
const sections = (document as Record<string, unknown>).sections;
if (!Array.isArray(sections)) return [];
return sections.filter(isDocumentSection);
return sections
.filter(isDocumentSection)
.map((section) => ({
...section,
entries: section.entries.map((entry) => ({
...entry,
body: typeof entry.body === "string" ? entry.body : "",
})),
}));
}