From e6fb53bf15f50664b6beada0bba37efdcfdcb99a Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sun, 15 Feb 2026 09:49:49 -0700 Subject: [PATCH] fix: replace /s regex flag with [\s\S] for ES2017 compat Co-Authored-By: Claude Opus 4.6 --- src/app/demo/demo-content.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(