diff --git a/src/app/demo/demo-content.tsx b/src/app/demo/demo-content.tsx index 8442b95..ae0dc2b 100644 --- a/src/app/demo/demo-content.tsx +++ b/src/app/demo/demo-content.tsx @@ -181,7 +181,7 @@ function renderInline(text: string): React.ReactNode { while (remaining.length > 0) { // Bold **text** - const boldMatch = remaining.match(/^(.*?)\*\*(.+?)\*\*(.*)$/s) + const boldMatch = remaining.match(/^([\s\S]*?)\*\*([\s\S]+?)\*\*([\s\S]*)$/) if (boldMatch) { if (boldMatch[1]) parts.push({boldMatch[1]}) parts.push({boldMatch[2]}) @@ -190,7 +190,7 @@ function renderInline(text: string): React.ReactNode { } // Italic *text* - const italicMatch = remaining.match(/^(.*?)\*(.+?)\*(.*)$/s) + const italicMatch = remaining.match(/^([\s\S]*?)\*([\s\S]+?)\*([\s\S]*)$/) if (italicMatch) { if (italicMatch[1]) parts.push({italicMatch[1]}) parts.push({italicMatch[2]}) @@ -199,7 +199,7 @@ function renderInline(text: string): React.ReactNode { } // Inline code `text` - const codeMatch = remaining.match(/^(.*?)`(.+?)`(.*)$/s) + const codeMatch = remaining.match(/^([\s\S]*?)`([\s\S]+?)`([\s\S]*)$/) if (codeMatch) { if (codeMatch[1]) parts.push({codeMatch[1]}) parts.push(