# Bug with cloze encapsulating a list

**URL:** <https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549>\
**Category:** Help\
**Created:** [January 19, 2023, 4:51pm UTC](https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549 "2023-01-19T16:51:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![relevartt](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@relevartt](https://forums.ankiweb.net/u/relevartt)\
**Post date:** [January 19, 2023, 4:51pm UTC](https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549/1 "2023-01-19T16:51:20Z")

</div>

When I let a cloze encapsulate a list (specifically, I open it before the list and end at the end of the list), then when I reveal that card all text coming after that cloze gets displayed as if it were inside the cloze (blue and fat).

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [January 20, 2023, 8:21pm UTC](https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549/2 "2023-01-20T20:21:45Z")

</div>

Works for me normally.  
Can you paste the HTML of the field here? (Press Ctrl+X to open the HTML view or use the `<>` button to the right of the field name). Be sure to use the `</>` button in this forum editor to paste the contents.

---

<div class="post-metadata">

**Author:** ![relevartt](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@relevartt](https://forums.ankiweb.net/u/relevartt)\
**Post date:** [January 21, 2023, 12:04pm UTC](https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549/3 "2023-01-21T12:04:09Z")

</div>

```auto
{{c1::this is<br><ul><li>an example}}</li></ul><div>so you see what I mean</div>

```

or even

```auto
{{c1::this is<br><ul><li>an example.</li></ul><div>}}</div><div>so you see what I mean</div>

```

The result is the same:

![Screenshot 2023-01-21 130322](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/4/41fae582c07ea2d4382405f2b1d10048f69d8655.png)

A related problem may be this: [\<div\>\</div\> makes it difficult to create matjax underneath list](https://forums.ankiweb.net/t/div-div-makes-it-difficult-to-create-matjax-underneath-list/26607)

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [January 21, 2023, 10:46pm UTC](https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549/4 "2023-01-21T22:46:05Z")

</div>

I see. This happens because a div is only partially clozed.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/e/e69993da49b00072286e5c1c469c5a9598243781.png)

I can’t seem to produce the same HTML when using the cloze button normally though. You’re not adding the clozes manually, right?

Tested on version 2.1.56.

---

<div class="post-metadata">

**Author:** ![relevartt](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@relevartt](https://forums.ankiweb.net/u/relevartt)\
**Post date:** [January 22, 2023, 10:40am UTC](https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549/5 "2023-01-22T10:40:34Z")

</div>

Ahh I was adding them manually and using ctrl+shift+c shortkey, which seems to be the problem indeed 😕 But then it is not possible to exclude some text in the last point of the list, such as a dot for example (to not reveal that there is a list there), which is a drawback…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [February 21, 2023, 10:40am UTC](https://forums.ankiweb.net/t/bug-with-cloze-encapsulating-a-list/26549/6 "2023-02-21T10:40:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
