Nesting custom containers #185

Open
opened 2026-01-29 14:29:47 +00:00 by claunia · 0 comments
Owner

Originally created by @macaba on GitHub (Jan 31, 2018).

I've had a play around to see if nested custom containers works.
(Spoiler: I don't think it does, by design.)

Example markdown:

:::{.row}
::::{.col-md-6}
Left half
::::
::::{.col-md-6}
Right half
::::
:::

The undesired result:

<div class="row">
<div class="col-md-6"><p>Left half</p>
</div>
</div>
<div class="col-md-6"><p>Right half</p>
</div>
<div></div>

The hypothetical desired result:

<div class="row">
<div class="col-md-6"><p>Left half</p>
</div>
<div class="col-md-6"><p>Right half</p>
</div>
</div>

I'm just putting the finishing touches to an (unrelated) new extension so I am getting familiar with the extension methodology therefore I had a quick look at the custom container extension and couldn't see any explicit functionality that would enable nested containers.

Is this something that could be added easily? Does it make sense to add it?

Originally created by @macaba on GitHub (Jan 31, 2018). I've had a play around to see if nested custom containers works. (Spoiler: I don't think it does, by design.) Example markdown: ``` :::{.row} ::::{.col-md-6} Left half :::: ::::{.col-md-6} Right half :::: ::: ``` The undesired result: ``` <div class="row"> <div class="col-md-6"><p>Left half</p> </div> </div> <div class="col-md-6"><p>Right half</p> </div> <div></div> ``` The hypothetical desired result: ``` <div class="row"> <div class="col-md-6"><p>Left half</p> </div> <div class="col-md-6"><p>Right half</p> </div> </div> ``` I'm just putting the finishing touches to an (unrelated) new extension so I am getting familiar with the extension methodology therefore I had a quick look at the custom container extension and couldn't see any explicit functionality that _would_ enable nested containers. Is this something that could be added easily? Does it _make sense_ to add it?
claunia added the question label 2026-01-29 14:29:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#185