porterjr
porterjr

Reputation: 102

Embeddable collapsible sections in asciidoctor

If there is a possibility to embed collapsible sections in another collapsible section in asciidoctor? I am trying to achieve something like (here Address is embedded in Customer):

Embedded collapsible sections from swager

I tried typing something like that (but unfortunately that doesn't work):

.first
[%collapsible]
====
First val

.second
[%collapsible]
====
Second val
====

====

Upvotes: 2

Views: 1046

Answers (1)

eskwayrd
eskwayrd

Reputation: 4521

Yes. You can nest blocks provided that the delimiter lines differ. When you use the same number of equals signs, Asciidoctor cannot tell that you are starting a new block instead of closing the first block.

Try this instead:

.first
[%collapsible]
====
First val

.second
[%collapsible]
=====
Second val
=====

====

Upvotes: 7

Related Questions