[Bug] Markdown parsing issue: Dollar signs ($) trigger incorrect inline math rendering

Description:
There is a Markdown rendering bug in the Google AI Studio UI. When the model generates text containing multiple financial figures using the dollar sign ($), the UI’s markdown parser incorrectly interprets the text between the dollar signs as inline LaTeX/math code.

As a result, normal sentences are rendered without spaces and in an italicized math font, making the output hard to read.

Steps to Reproduce:

  1. Go to Google AI Studio.
  2. Ask the model to generate a text that includes two currency amounts using the $ symbol, separated by normal text.
    (Example prompt: “Escribe una frase sobre finanzas que diga que la empresa vale $2000B y su flujo de caja es $70B.”)
  3. Look at the rendered output in the UI.

Expected Behavior:
The $ symbols should be treated as standard currency characters unless specifically formatted as a math block, and the text between them should render as normal paragraph text with proper spacing.

Actual Behavior:
The text between the first $ and the second $ is parsed as an inline math equation. The spaces are stripped, and the font changes to an italic math format. (e.g., $suFlujodeCajaLibreenelúltimoaño$).

Environment:

  • Google AI Studio web interface.
  • Browser: Google Chrome 145.0
  • OS: MacOS Tahoe 26.3

Attachments:
(Please see the attached screenshot where the Spanish text “su Flujo de Caja Libre en el último año” is incorrectly squished into a math formula).