Login  Register

Including code blocks in a list without breaking the item numbering

Posted by awilkinson on Jun 04, 2014; 12:19pm
URL: https://discuss.asciidoctor.org/Including-code-blocks-in-a-list-without-breaking-the-item-numbering-tp1781.html

We've got a section in the Spring Boot docs where we're using code blocks within a list. It produces warnings at build time and the item numbers are incorrect in the generated documentation: 1, 2, 1, 1, 1 instead of 1, 2, 3, 4, 5.

It's a bit of a hack, but I've tried using ["arabic", start=n] (where n is 3, 4, or 5) to start the "new" lists with the right number. Unfortunately, it had no effect.

How can we use code blocks as part of an item in a list and retain the correct item numbering?