mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-07 22:33:57 -05:00
fix(frontend): Disable single dollar sign LaTeX mode in markdown rend… (#11598)
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user