Issue
Inline formulas are not rendered as formulas when directly preceded by other characters. For example, "$a$ $b$" is rendered as "$a$ b":

https://kagi.com/assistant/fa66123f-985e-4891-89f8-2a9e26757d95
Other Examples
| Raw | Should Render As | Actually Rendered As | Example Link |
| "$a$ | "a | "$a$ | Link |
| a$a$ | a a (without space) | a$a$ | Link |
| "$a$$b$" | ab | "$a$$b$" | Link |
The expected behaviour is the same as the behaviour of LaTeX, which I have tested in Overleaf.
This does not appear to be model-specific, as copying and pasting the response into some text editor shows that the raw output contains the correct syntax.
Expected Behaviour
Inline formulas preceded by quotation marks or other characters should be rendered as formulas and not as plain text. For example, "$a$ $b$" should be rendered as "a b":

(HTML edited to show expected rendering)