diff options
Diffstat (limited to 'js/app.js')
| -rw-r--r-- | js/app.js | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -198,17 +198,19 @@ function openModal(bookId) { // Get summary from book data (embedded by build.js) const summary = book.summary; - // Build summary section + // Build summary section - split into paragraphs let summaryHtml; if (summary) { + const paragraphs = summary.split(/\n\n+/).filter(p => p.trim()); + const paragraphsHtml = paragraphs.map(p => `<p>${escapeHtml(p)}</p>`).join('\n'); summaryHtml = ` - <h3>Summary</h3> - <p>${escapeHtml(summary)}</p> + <h3>Plot</h3> + ${paragraphsHtml} `; } else { summaryHtml = ` - <h3>Summary</h3> - <p class="no-summary">No summary available for this book.</p> + <h3>Plot</h3> + <p class="no-summary">No plot summary available for this book.</p> `; } |
