# markdown: Fix out of range panic in parser \(\#30510\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/06af0310f7b210f9dadf7fd36b328c71ace8af05)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 06af0310f7b210f9dadf7fd36b328c71ace8af05

Requested commit: 06af0310f7b210f9dadf7fd36b328c71ace8af05

Commit: 06af0310f7b210f9dadf7fd36b328c71ace8af05

Tree: 43b98cc8e5b43dd4ffc13a642984e4ef56da2a99

Author: Bennet Bo Fenner

Committer: GitHub

## Message

``````
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
``````

## Parents

- [1fa19c69a638341a2d7f15803d288c705d145139](https://git.cafe/gitcafe/zed/commit/1fa19c69a638341a2d7f15803d288c705d145139?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/06af0310f7b210f9dadf7fd36b328c71ace8af05?format=markdown)
