markdown: Fix out of range panic in parser (#30510)

For some reason `pulldown_cmark` treats \````` as a codeblock, meaning
that we could end up with an invalid range generated from
`extract_code_block_content_range` (`3..2`)

Closes #30495

Release Notes:

- agent: Fix an edge case where the editor would crash when model
generated malformed markdown
06af0310f7Bennet Bo Fenner committed on 5/11/2025, 3:08:37 PM· committed by GitHubparent1fa19c6
1 file changedLine totals unavailable