glutanimate / mini-format-pack

Extends Anki 2.1 with a number of additional text formatting buttons
https://ankiweb.net/shared/info/295889520
Other
49 stars 13 forks source link

Nested lists are inserted using invalid html #26

Open orgtre opened 3 years ago

orgtre commented 3 years ago

Problem description

Thanks for this essential add-on! When creating nested lists using toggle list and indent the resulting html is technically invalid. While this doesn't cause any problems within Anki as far as I can see, it creates problems and incorrectly displayed output when trying to parse the notes using external programs such as pandoc.

For a minimal example, open a blank note, press "Toggle unordered list", write something and press enter, press "Indent", and look at the html produced:

<ul><li>item</li><ul><li><br></li></ul></ul>

According to https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list this is not correct while this would be:

<ul><li>item<ul><li><br></li></ul></li></ul>

I realize this might not affect many people, but if there is some quick way to fix this, it would help me a lot.

Checklist

Please replace the space inside the brackets with an x if the following items apply: