# markdown preview: Break up list items into individual blocks \(\#10852\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9329ef1d7864921979c2554ce18cbce807746ae4

Requested commit: 9329ef1d7864921979c2554ce18cbce807746ae4

Commit: 9329ef1d7864921979c2554ce18cbce807746ae4

Tree: 60f8f10436e1701eae44aa7ffb59c968e8d5919d

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
markdown preview: Break up list items into individual blocks (#10852)

Fixes a panic related to rendering checkboxes, see #10824.

Currently we are rendering a list into a single block, meaning the whole
block has to be rendered when it is visible on screen. This would lead
to performance problems when a single list block contained a lot of
items (especially if it contained checkboxes). This PR splits up list
items into separate blocks, meaning only the actual visible list items
on screen get rendered, instead of the whole list.
A nice side effect of the refactoring is, that you can actually click on
individual list items now:


https://github.com/zed-industries/zed/assets/53836821/5ef4200c-bd85-4e96-a8bf-e0c8b452f762

Release Notes:

- Improved rendering performance of list elements inside the markdown
preview

---------

Co-authored-by: Remco <djsmits12@gmail.com>
```

## Parents

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

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