From e217e826ce2129aa64a762546f9bbe7b9d356cc9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 25 Jan 2026 11:15:27 +0200 Subject: Render plot summaries with proper paragraph breaks - Split summary text by double newlines into separate

tags - Rename section header from "Summary" to "Plot" Co-Authored-By: Claude Opus 4.5 --- js/app.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/app.js b/js/app.js index 9ea8265..f6dd210 100644 --- a/js/app.js +++ b/js/app.js @@ -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 => `

${escapeHtml(p)}

`).join('\n'); summaryHtml = ` -

Summary

-

${escapeHtml(summary)}

+

Plot

+ ${paragraphsHtml} `; } else { summaryHtml = ` -

Summary

-

No summary available for this book.

+

Plot

+

No plot summary available for this book.

`; } -- cgit v1.2.3