Bug: Anki displaying list incorrectly

Hello,
Unfortunately, even after reading through what felt like half a bible of FAQs I still have not been able to find a solution for my issue. The issue is as follows:

When adding lists to my flashcards, things are displayed on wrong levels while rehearsing the card. However, in the card editor, it all looks perfectly fine. Does anyone know how I can fix this?

(it’s in German, but the content of a card is irrelevant to this)

(when viewed in editor)

While “Materielle Verfassungsmäßigkeit des Gesetzes” (last line in red) is shown as “3.”, it really should be “c.”. Also, “Verfassungsmäßigkeit der Einzelfallentscheidung (…)” (the last line) should be “3.”, but it’s shown as a bullet point.

Nothing I have tried has fixed this, and any advice would be very appreciated as this is really throwing me off.

also, i am aware that learning lists is rather ineffective but this is required for my field of study (German law). it is especially important to know what bullet points are at what level, as remembering this wrong could have really bad results.

This is probably caused by faulty HTML. When you have selcted the field from your second screenshot, press Ctrl+Shift+X to view the raw HTML text. If you want to post it here so we can help, make sure to wrap it in ``` like this:

```
[The content you copied from the field]
```
1 Like

Okay, thank you. The code is

<div><center><h3>Rechtfertigung mittels Gesetzesvorbehalt</h3></center></div><ol start="1" type="1"><li>Grundrecht mit Gesetzesvorbehalt</li><li>Verfassungsmäßigkeit der gesetzlichen Eingriffsgrundlage (Gesetzesebene)</li><ol start="1" type="a"><li>{{c1::Einschränkung nur "durch Gesetz" oder "auf Grund eines Gesetzes"?}}</li><li>{{c1::Formelle Verfassungsmäßigkeit des Gesetzes}}[[</li><ol start="1" type="a"><li>Zuständigkeit (Gesetzgebungskompetenz)</li><li>Verfahren</li><li>Form]]</li></ol><li>{{c1::Materielle Verfassungsmäßigkeit des Gesetzes}}[[</li><ol start="1" type="a"><li><i>Bei qualifiziertem Gesetzesvorbehalt: Qualifizierende Tatbestandsmerkmale</i></li><li>Bestimmtheitsgebot (Bei Strafgesetzen: Art. 103 II GG, ansonsten aus Art. 20 III GG)</li><li>Verbot des Einzelfallgesetzes, Art. 19 I 1 GG</li><li>Zitiergebot, Art. 19 I 2 GG</li><li>Wesenhaltsgarantie, Art. 19 II GG</li><li>Verhältnismäßigkeit]]</li></ol></ol><li>Verfassungsmäßigkeit der Einzelfallentscheidung (Gesetzesanwendungsebene)</li><ol start="1" type="a"><li>Formelle Verfassungsmäßigkeit</li><li>Materielle Verfassungsmäßigkeit</li><ol start="1" type="a"><li>Bestimmtheit</li><li>Wesenhaltsgarantie, Art. 19 I GG</li><li>Verhältnismäßigkeit</li></ol></ol></ol>

Thanks!

Where did you get this? It clearly contains some outdated HTML.
My guess is that your problem is caused by the nested lists which are not properly wrapped in <li> tags. That is:

<ol>
	<li>...</li>
	<li>...</li>
	<ol>
		<li>...</li>
	</ol>
</ol>

should rather look like this:

<ol>
	<li>...</li>
	<li>...
		<ol>
			<li>...</li>
		</ol>
	</li>
</ol>

You probably don’t want to fix that by hand, so maybe try to find a tool that provides cleaner HTML.

1 Like

When I format a nested table myself inside Anki with the add-on “mini format pack” I get similar html where I have ol tags as child elements of another ol. So the “mini format pack” might lead to invalid html (which so far has never been a problem for me)?

When I create a similar table from plain text with the html editor tinymce5 (in my add-on extended editor for field (for tables, search&replace, …)) I get a nested list that doesn’t have the problem of nested ols.

But if I put this nested list into old versions of the lückentext template it still isn’t shown properly. So the problem is maybe with your templates?

When I use a recent version of the lückentext template (that you can get with the butler add-on) your code (and mine) just work properly.

So I guess it’s about your template? I would update them. Before you do this: make sure to have backups of your anki data and know how to restore them.

 

context: about the “lückentext” note type, https://www.youtube.com/watch?v=K9sfDS1aOJ8

1 Like