mkfin
mkfin

Reputation: 517

How to prevent images from resetting ordered list numbering in asciidoctor

I am using asciidoctor to generate html. I have the following list:

. one
. two 
. three

image::mypic.png[]
. four

And when converted to html, it looks like this:

1. one
2. two 
3. three
<my picture>
1. four

In html, I would like to see:

1. one
2. two 
3. three
<my picture>
4. four

I do not want to reset the counter manually after inserting an image, because i have a hundreds of similar situations.

Upvotes: 21

Views: 3015

Answers (1)

Jmini
Jmini

Reputation: 9497

Inspired by the asciidoctor documentation (section Complex List Content) you can add a + instead of a blank line before your image block.

. one
. two 
. three
+
image::mypict.png[]
. four

Upvotes: 34

Related Questions