diff --git a/web/src/components/ReaderView.tsx b/web/src/components/ReaderView.tsx index fa22445..a0ed140 100644 --- a/web/src/components/ReaderView.tsx +++ b/web/src/components/ReaderView.tsx @@ -8,7 +8,14 @@ interface ReaderViewProps { export function ReaderView({ article, onClose, onToggleFavorite }: ReaderViewProps) { // Determine content to show: full content > summary > default message - const displayContent = article.content || article.summary || '

Aucun contenu disponible pour cet article.

'; + let displayContent = article.content || article.summary || '

Aucun contenu disponible pour cet article.

'; + + // If we have a hero image, try to remove the first image from the content to avoid duplicates + if (article.image_url) { + // Simple regex to remove the first img tag if it exists at the start of the content + // This is a heuristic and might need refinement, but handles the "duplicate" complaint common in RSS + displayContent = displayContent.replace(/]*>/, ''); + } return (