+4
-4
lib/utils.ts
+4
-4
lib/utils.ts
···
245
245
children.push(`${segment.text}`);
246
246
}
247
247
}
248
-
html += `<p>${children}</p>`;
248
+
html += `<p>${children.join("")}</p>`;
249
249
}
250
250
251
251
if (is(PubLeafletBlocksHeader.mainSchema, block.block)) {
···
273
273
html += `<hr />`;
274
274
}
275
275
if (is(PubLeafletBlocksUnorderedList.mainSchema, block.block)) {
276
-
html += `<ul>$${block.block.children.map((child) => renderListItem(child))}</ul>`;
276
+
html += `<ul>${block.block.children.map((child) => renderListItem(child)).join("")}</ul>`;
277
277
}
278
278
279
-
return html;
279
+
return html.trim();
280
280
}
281
281
282
282
function renderListItem(item: PubLeafletBlocksUnorderedList.ListItem): string {
283
283
const children: string | null = item.children?.length
284
284
? `<ul>${item.children.map((child) => renderListItem(child))}</ul>`
285
-
: null;
285
+
: "";
286
286
287
287
return `<li>${parseBlocks({ block: item.content })}${children}</li>`;
288
288
}
+1
-1
package.json
+1
-1
package.json