Skip to content

Commit

Permalink
🐛 Add new line before heading, fixed #108
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Jan 14, 2023
1 parent 0012ee4 commit 393b5c6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/features/update-summary.ts
Expand Up @@ -100,7 +100,7 @@ export const updateSummary = async (
const apiWantToRead = api.filter((i) => i.state === "want-to-read");
const apiReading = api.filter((i) => i.state === "reading");
if (apiReading.length)
mdContent += `### ⌛ Currently reading (${apiReading.length})\n\n${apiReading
mdContent += `\n\n### ⌛ Currently reading (${apiReading.length})\n\n${apiReading
.map(
(i) =>
`[![Book cover of ${i.title.replace(
Expand All @@ -114,9 +114,7 @@ export const updateSummary = async (
)
.join("\n")}`;
if (apiCompleted.length)
mdContent += `${apiReading.length ? "\n\n" : ""}### ✅ Completed (${
apiCompleted.length
})\n\n${apiCompleted
mdContent += `\n\n### ✅ Completed (${apiCompleted.length})\n\n${apiCompleted
.map(
(i) =>
`[![Book cover of ${i.title.replace(
Expand All @@ -137,9 +135,7 @@ export const updateSummary = async (
)
.join("\n")}`;
if (apiWantToRead.length)
mdContent += `${apiCompleted.length ? "\n\n" : ""}### ⏭️ Want to Read (${
apiWantToRead.length
})\n\n${apiWantToRead
mdContent += `\n\n### ⏭️ Want to Read (${apiWantToRead.length})\n\n${apiWantToRead
.map(
(i) =>
`[![Book cover of ${i.title.replace(
Expand Down

0 comments on commit 393b5c6

Please sign in to comment.