Skip to content

Commit ff42ee1

Browse files
committed
revert: drop out-of-scope parse-novel playground summary changes
Restore src/components/parse-novel.tsx to pre-093668b state; TruyenSS summary parsing in the plugin is unchanged.
1 parent bbedd4e commit ff42ee1

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

src/components/parse-novel.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,6 @@ type ParseNovelSectionProps = {
2727
onNavigateToParseChapter?: () => void;
2828
};
2929

30-
/** Normalize line breaks / spaces for multi-line summary display (playground + long single-line strings). */
31-
function formatSummaryForDisplay(raw: string): string {
32-
return raw
33-
.replace(/\r\n/g, '\n')
34-
.replace(/\r/g, '\n')
35-
.replace(/[\t\f\v]+/g, ' ')
36-
.replace(/ *\n */g, '\n')
37-
.replace(/[ \u00a0]+/g, ' ')
38-
.replace(/\n{3,}/g, '\n\n')
39-
.trim();
40-
}
41-
4230
const ParseNovelSection = React.memo(function ParseNovelSection({
4331
onNavigateToParseChapter,
4432
}: ParseNovelSectionProps) {
@@ -372,8 +360,8 @@ const ParseNovelSection = React.memo(function ParseNovelSection({
372360
<h4 className="font-semibold text-foreground mb-2">
373361
Summary
374362
</h4>
375-
<p className="max-w-prose text-sm text-muted-foreground leading-7 whitespace-pre-line break-words font-sans antialiased">
376-
{formatSummaryForDisplay(sourceNovel.summary)}
363+
<p className="text-sm text-muted-foreground leading-relaxed whitespace-pre-wrap">
364+
{sourceNovel.summary}
377365
</p>
378366
</div>
379367
)}

0 commit comments

Comments
 (0)