When using the Gemini 2.5Pro model, the returned content does not have proper line breaks

When using the Gemini 2.5 Pro model to ask questions, I request it to return answers in Markdown format. Although the response is generally in Markdown, occasionally line breaks are not generated, causing the Markdown renderer to fail and resulting in loss of proper formatting.

One more thing to note is that the prompt specifies the use of Markdown format.

https://cloud.google.com/iam/docs/roles-permissions/backupdr#backup-and-disaster-recovery-permissions

“Modified by moderator”

@eSapiens ,

thank you for this input, is this issue reproducible or frequently occuring?
also have you tried this on the latest 2.5 Pro stable endpoint?

if the problem still persists, can you please give us more details of your prompt and corresponding response.

Thank you.

Im also experiencing this. It helped a bit when you explicitly write something like:

  • Subheaders (\n\n ### or \n\n ####) should be used later in the summary to organize additional sections

So include the \n\n in the prompt. Still fails sometimes but better. Still annoying though