Skip to content

Markdown rendering issue with LaTeX-style syntax ($, \, etc.) #25656

@EnochJasonJ

Description

@EnochJasonJ

What happened?

When generating Markdown output using gemini-cli, content that includes LaTeX-style syntax (e.g., $, , \to, \dots) is not rendered correctly.

Instead of being interpreted properly (as math or escaped text), the raw characters are displayed in a broken or inconsistent way in Markdown viewers (e.g., GitHub issue preview).

For example:
A set of processes ${P_0, P_1, \dots, P_n}$ exists...
and
If the graph contains no cycles $\to$ No Deadlock.
These are rendered incorrectly or appear as plain text with escape characters visible, rather than formatted expressions.

This affects readability and makes the output look unpolished, especially for technical content (e.g., OS, math, algorithms).

Image

What did you expect to happen?

  • Either:
    • Proper rendering of LaTeX-style expressions (if supported), or
    • Proper escaping/formatting so the text displays cleanly in Markdown (e.g., without broken symbols)

Example expected output:
A set of processes {P₀, P₁, ..., Pₙ} exists...
or properly escaped Markdown-safe text.

Client information

About Gemini CLI

Property Value
CLI Version 0.38.1
Git Commit 7f55800
Model Auto (Gemini 3)
Sandbox No sandbox
OS darwin
Auth Method Signed in with Google
Tier Gemini Code Assist in Google One AI Pro

Login information

I'm logging in with my Google Account.

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!type/bug

Type

No fields configured for Bug.

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions