Weird format when nesting custom containers. #214

Open
opened 2026-01-29 14:30:35 +00:00 by claunia · 3 comments
Owner

Originally created by @pauldotknopf on GitHub (Jun 24, 2018).

I'm trying to create some utility classes for use in my markdown.

Give this:

:::section-columns

:::section-column

column 1

:::

:::section-column

column 2

:::

:::

I get this:

<div class="section-columns">
    <div class="section-column">
        <p>column 1</p>
    </div>
</div>
<div class="section-column">
    <p>column 2</p>
</div>
<div>
</div>

I expected (wrongly?) this:

<div class="section-columns">
    <div class="section-column">
        <p>column 1</p>
    </div>
    <div class="section-column">
        <p>column 2</p>
    </div>
</div>
Originally created by @pauldotknopf on GitHub (Jun 24, 2018). I'm trying to create some utility classes for use in my markdown. Give this: ``` :::section-columns :::section-column column 1 ::: :::section-column column 2 ::: ::: ``` I get this: ``` <div class="section-columns"> <div class="section-column"> <p>column 1</p> </div> </div> <div class="section-column"> <p>column 2</p> </div> <div> </div> ``` I expected (wrongly?) this: ``` <div class="section-columns"> <div class="section-column"> <p>column 1</p> </div> <div class="section-column"> <p>column 2</p> </div> </div> ```
claunia added the enhancementPR Welcome! labels 2026-01-29 14:30:35 +00:00
Author
Owner

@pauldotknopf commented on GitHub (Jun 24, 2018):

Hmm, sorry, I see another issue here with the same issue: #202

I think it comes down to the number of :'s used. Let me try that real quick.

@pauldotknopf commented on GitHub (Jun 24, 2018): Hmm, sorry, I see another issue here with the same issue: #202 I think it comes down to the number of `:`'s used. Let me try that real quick.
Author
Owner

@pauldotknopf commented on GitHub (Jun 24, 2018):

Yup, this works:

::::section-columns

:::section-column

column 1

:::

:::section-column

column 2

:::

::::

Any ideas why that is required? Pandoc seems to handle it (correctly?).

@pauldotknopf commented on GitHub (Jun 24, 2018): Yup, this works: ``` ::::section-columns :::section-column column 1 ::: :::section-column column 2 ::: :::: ``` Any ideas why that is required? Pandoc seems to handle it (correctly?).
Author
Owner

@xoofx commented on GitHub (Jul 10, 2018):

Yes, it was mainly by design/implementation practicability (reusing an existing component to perform the parsing) but if Pandoc is actually not doing that, we can adopt a similar behavior. It may require a dedicated parser through. PR Welcome (don't have spare time for this!)

@xoofx commented on GitHub (Jul 10, 2018): Yes, it was mainly by design/implementation practicability (reusing an existing component to perform the parsing) but if Pandoc is actually not doing that, we can adopt a similar behavior. It may require a dedicated parser through. PR Welcome (don't have spare time for this!)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#214