(article: Article, maxChunkSize: number)
| 105 | } |
| 106 | |
| 107 | function chunkArticle(article: Article, maxChunkSize: number): Chunk[] { |
| 108 | const chunks: Chunk[] = []; |
| 109 | |
| 110 | for (const component of article.article_components) { |
| 111 | const articleChunks = breakdownArticleComponent( |
| 112 | article.url, |
| 113 | component, |
| 114 | article.subpath, |
| 115 | maxChunkSize, |
| 116 | ); |
| 117 | chunks.push(...articleChunks); |
| 118 | } |
| 119 | |
| 120 | return chunks; |
| 121 | } |
| 122 | |
| 123 | export async function htmlPageToArticleWithChunks( |
| 124 | page: PageData, |
no test coverage detected