( rel: string, sidecar: DatabaseSidecar, rows: DbRow[], pageHasContent?: Record<string, boolean> )
| 126 | } |
| 127 | |
| 128 | function hydrate( |
| 129 | rel: string, |
| 130 | sidecar: DatabaseSidecar, |
| 131 | rows: DbRow[], |
| 132 | pageHasContent?: Record<string, boolean> |
| 133 | ): DatabaseDoc { |
| 134 | return { |
| 135 | ...sidecar, |
| 136 | path: toPosix(rel), |
| 137 | title: titleFromPath(rel), |
| 138 | rows, |
| 139 | ...(pageHasContent ? { pageHasContent } : {}) |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | /** True if a note has body content beyond its frontmatter + a single title heading. */ |
| 144 | function noteHasBody(text: string): boolean { |
no test coverage detected