fix formatting issues with lists

nulfrost e313fa57 cabd8f51

Changed files
+5 -5
lib
+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
··· 25 25 "typecheck": "tsc", 26 26 "release": "pnpm run build && changeset publish", 27 27 "build": "rm -rf dist && tsup --format esm --dts", 28 - "pack": "pnpm build && pnpm pack" 28 + "pack": "rm -rf *.tgz && pnpm build && pnpm pack" 29 29 }, 30 30 "license": "MIT", 31 31 "files": [