From 33f0238d58e67c0f35f8f2d5397641a076268608 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 25 Feb 2026 02:36:57 +0100 Subject: [PATCH] fix: render markdown-style lists from MDX migration as proper HTML ul/li elements --- components/PayloadRichText.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/components/PayloadRichText.tsx b/components/PayloadRichText.tsx index 96fdf997..9e4dabb8 100644 --- a/components/PayloadRichText.tsx +++ b/components/PayloadRichText.tsx @@ -27,6 +27,24 @@ const jsxConverters: JSXConverters = { return ; } + // Handle markdown-style lists embedded in text nodes from MDX migration + if (text && text.includes('\n- ')) { + const parts = text.split('\n- ').filter(Boolean); + // If first part doesn't start with "- ", it's a prefix paragraph + const startsWithDash = text.trimStart().startsWith('- '); + const prefix = startsWithDash ? null : parts.shift(); + return ( + <> + {prefix && {prefix}} + + + ); + } + if (node.format === 1) return {text}; if (node.format === 2) return {text}; return {text};