From a263e551ac71dda548364e285e7b91e173423d60 Mon Sep 17 00:00:00 2001 From: hubhub-ops Date: Sat, 8 Aug 2026 11:56:52 +0200 Subject: [PATCH] fix(novelfrance): prevent skipping first paragraph in chapter parsing (#2391) --- plugins/french/novelfrance.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/french/novelfrance.ts b/plugins/french/novelfrance.ts index 9e14c68..fea0fe8 100644 --- a/plugins/french/novelfrance.ts +++ b/plugins/french/novelfrance.ts @@ -59,7 +59,7 @@ class NovelFrancePlugin implements Plugin.PluginBase { name = 'NovelFrance'; icon = 'src/fr/novelfrance/icon.png'; site = 'https://novelfrance.fr/'; - version = '1.0.0'; + version = '1.0.1'; private async fetchJson(url: string): Promise { const r = await fetchApi(url); @@ -205,9 +205,14 @@ class NovelFrancePlugin implements Plugin.PluginBase { if (title) parts.push(`

${this.escapeHtml(title)}

`); for (const p of data.paragraphs || []) { - if (title && p.index === 0) continue; const content = (p.content || '').trim(); if (!content) continue; + + // Si le paragraphe d'index 0 est une répétition exacte du titre du chapitre, on l'ignore + if (title && p.index === 0 && content.toLowerCase() === title.trim().toLowerCase()) { + continue; + } + parts.push(`

${this.escapeHtml(content)}

`); }