From 7ff282c9088f904a5af59cae87b611386f3d97d9 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Wed, 10 Dec 2025 11:10:52 -0600 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20Disable=20single=20dollar=20si?= =?UTF-8?q?gn=20LaTeX=20mode=20in=20markdown=20rend=E2=80=A6=20(#11598)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Single dollar signs ($10, $variable) are commonly used in content and were being incorrectly interpreted as inline LaTeX math delimiters. This change disables that behavior while keeping double dollar sign ($$...$$) math blocks working. ## Changes 🏗️ • Configure remarkMath plugin with singleDollarTextMath: false in MarkdownRenderer.tsx • Double dollar sign display math ($$...$$) continues to work as expected • Single dollar signs are no longer interpreted as inline math delimiters ## Checklist 📋 For code changes: -[x] I have clearly listed my changes in the PR description -[x] I have made a test plan -[x] I have tested my changes according to the test plan: -[x] Verify content with dollar amounts (e.g., “$100”) renders as plain text -[x] Verify double dollar sign math blocks ($$x^2$$) still render as LaTeX -[x] Verify other markdown features (code blocks, tables, links) still work correctly Co-authored-by: Claude --- .../OutputRenderers/renderers/MarkdownRenderer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/OutputRenderers/renderers/MarkdownRenderer.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/OutputRenderers/renderers/MarkdownRenderer.tsx index 97ff97d46c..d94966c6c8 100644 --- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/OutputRenderers/renderers/MarkdownRenderer.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/OutputRenderers/renderers/MarkdownRenderer.tsx @@ -166,7 +166,7 @@ function renderMarkdown( className="prose prose-sm dark:prose-invert max-w-none" remarkPlugins={[ remarkGfm, // GitHub Flavored Markdown (tables, task lists, strikethrough) - remarkMath, // Math support for LaTeX + [remarkMath, { singleDollarTextMath: false }], // Math support for LaTeX ]} rehypePlugins={[ rehypeKatex, // Render math with KaTeX